Genesys Cloud - Developer Community!

 View Only

Sign Up

  • 1.  Export flow with dependencies excluding unnecessary information #2272

    Posted 11 hours ago

    Hi, I'm trying to transfer flows from a dev org to a production org. I'm having a small problem exporting a flow with its dependencies; too much information is being included, such as division and user resources, data that I don't need to transfer to the production org because it already exists. Do you know if it's possible to exclude some resources when exporting the flow with dependencies? What other options do you know of?

    I tried using:

    include_filter_resources and exclude_filter_resources, but I haven't been able to use both features simultaneously.

    example

    terraform {
      required_providers {
        genesyscloud = {
          source  = "MyPureCloud/genesyscloud"
          version = "1.76.2"
        }
      }
    }
    
    provider "genesyscloud" {
      access_token = var.genesys_prod_access_token
      aws_region   = var.genesys_prod_aws_region
    }
    
    resource "genesyscloud_tf_export" "export_flow" {
      directory                      = "./flows"
      export_format                  = "hcl"
      log_permission_errors          = true
      include_state_file             = true
      enable_dependency_resolution       = true
      split_files_by_resource            = true
      use_legacy_architect_flow_exporter = false
      exclude_attributes           = ["genesyscloud_user.skill"]
      include_filter_resources = [
        # Flujo principal
        "genesyscloud_flow::001-lab-V1.0-PruebasDeAutomatización"
      ]
    
      exclude_filter_resources = [
        # Recursos relacionados con usuarios y habilidades
        "genesyscloud_user.*"
      ]
    }
    
    <clipboard-copy aria-label="Copy" class="ClipboardButton btn js-clipboard-copy m-2 p-0" data-copy-feedback="Copied!" data-tooltip-direction="w" value="terraform { required_providers { genesyscloud = { source = "MyPureCloud/genesyscloud" version = "1.76.2" } } } provider "genesyscloud" { access_token = var.genesys_prod_access_token aws_region = var.genesys_prod_aws_region } resource "genesyscloud_tf_export" "export_flow" { directory = "./flows" export_format = "hcl" log_permission_errors = true include_state_file = true enable_dependency_resolution = true split_files_by_resource = true use_legacy_architect_flow_exporter = false exclude_attributes = ["genesyscloud_user.skill"] include_filter_resources = [ # Flujo principal "genesyscloud_flow::001-lab-V1.0-PruebasDeAutomatización" ] exclude_filter_resources = [ # Recursos relacionados con usuarios y habilidades "genesyscloud_user.*", "genesyscloud_skill.*" ] }" role="button" tabindex="0"></clipboard-copy>

    resultado del terraform plan

    │ Error: Conflicting configuration arguments

    │ with genesyscloud_tf_export.export_flow,
    │ on main.tf line 29, in resource "genesyscloud_tf_export" "export_flow":
    │ 29: exclude_filter_resources = [
    │ 30: # Recursos relacionados con usuarios y habilidades
    │ 31: "genesyscloud_user.",
    │ 32: "genesyscloud_skill.
    "
    │ 33: ]

    │ "exclude_filter_resources": conflicts with include_filter_resources

    Estoy usando version = "1.76.2"


    #Architect
    #CXasCode

    ------------------------------
    Jesus Garces
    NA
    ------------------------------


  • 2.  RE: Export flow with dependencies excluding unnecessary information #2272

    Posted 10 hours ago

    Hi Jesus

    I don't know about the topic, but there's an answer from the "Orchestrator AI," see if it helps you.

    ---- 

    Based on your Terraform error, include_filter_resources and exclude_filter_resources cannot be used simultaneously - they conflict with each other by design in the Genesys Cloud Terraform provider (version 1.76.2).

    Here are your alternative options:

    Option 1: Use exclude_attributes only (with include_filter_resources)
    Since you're already using exclude_attributes = ["genesyscloud_user.skill"], you can expand this to exclude other unwanted attributes while keeping include_filter_resources for your specific flow:

    resource "genesyscloud_tf_export" "export_flow" {  
      directory                      = "./flows"  
      export_format                  = "hcl"  
      enable_dependency_resolution   = true  
      include_filter_resources = [  
        "genesyscloud_flow::001-lab-V1.0-PruebasDeAutomatización"  
      ]  
      exclude_attributes = [  
        "genesyscloud_user.skill",  
        "genesyscloud_user.division",  
        "genesyscloud_auth_division.*"  
      ]  
    }  
    

    However, this only excludes specific attributes, not entire resource types.

    Option 2: Use Archy (Recommended for your use case)
    For transferring flows between dev and production orgs, Archy is specifically designed to solve your problem. Archy allows you to:

    • Export flows in YAML format
    • Edit the flow in a text editor (like Visual Studio Code)
    • Use find-and-replace functionality to update mappings procedurally and automatically
    • Exclude or modify references to divisions, users, and other org-specific resources before importing

    This approach gives you complete control over what gets transferred and lets you update mappings for queues, data actions, and other dependencies that already exist in production.

    Option 3: Manual cleanup after export
    Export with include_filter_resources only, then manually remove unwanted resources from the generated Terraform files before applying them to production.

    Option 4: Use resource_types parameter
    Instead of filtering specific resources, you might be able to limit the export to specific resource types, though the documentation suggests checking the Terraform registry for the complete list of available parameters for genesyscloud_tf_export.

    For moving flows between orgs with existing infrastructure (like divisions and users), Archy is the best solution as it was specifically designed for this scenario.



    ------------------------------
    Kaio Oliveira
    GCP - GCQM - GCS - GCA - GCD - GCO - GPE & GPR - GCWM

    PS.: I apologize if there are any mistakes in my English; my primary language is Portuguese-Br.
    ------------------------------