hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.87k stars 9.21k forks source link

[Bug]: Unable to create aws_appflow_connector_profile for sapo_data #37678

Open nsb413 opened 6 months ago

nsb413 commented 6 months ago

Terraform Core Version

1.8.1

AWS Provider Version

5.46.0

Affected Resource(s)

aws_appflow_connector_profile

Expected Behavior

code snippet

resource "aws_appflow_connector_profile" "this" {
  name            = var.appflow_con_name
  connector_type  = var.appflow_con_type
  connection_mode = var.appflow_con_mode

  connector_profile_config {
    connector_profile_credentials {
      sapo_data {
        basic_auth_credentials {
          username = var.sapo_data_creds.username
          password = var.sapo_data_creds.password
        }
      }
    }
    connector_profile_properties {
      sapo_data {
        application_host_url      = try(var.appflow_con_props.application_host_url, null)
        application_service_path  = try(var.appflow_con_props.application_service_path, null)
        client_number             = try(var.appflow_con_props.client_number, null)
        logon_language            = try(var.appflow_con_props.logon_language, null)
        port_number               = try(var.appflow_con_props.port_number, null)
        private_link_service_name = try(var.appflow_con_props.private_link_service_name, null)
      }
    }
  }

}

Actual Behavior

Working fine from AWS Console, When created via AWS Console, in cloud trail seeing disableSSO:true, but not seeing that option via Terraform, unsure if that is the issue.

 "requestParameters": {
        "connectorType": "SAPOData",
        "connectorProfileConfig": {
            "connectorProfileProperties": {
                "SAPOData": {
                    "applicationHostUrl": "https://xxxxx",
                    "applicationServicePath": "/xxxxx/xxxxx/xxxxx/xxxxx/xxxxx;v=x/",
                    "privateLinkServiceName": "com.amazonaws.vpce.xxxxx-xxxxx-2.vpce-svc-xxxxx",
                    "portNumber": xxx,
                    "clientNumber": "xxx",
                    "logonLanguage": "xx",
                    "disableSSO": true
                }
            },
            "connectorProfileCredentials": "***"
        },
        "connectionMode": "Private",
        "connectorProfileName": "xxxxx"

Relevant Error/Panic Output Snippet

Error: creating AppFlow Connector Profile (xxxxxxxxx): operation error Appflow: CreateConnectorProfile, https response error StatusCode: 400, RequestID: 8fba8b4d-a1ed-4e68-b40d-7be93798bba7, api error ConnectorServerException: Error while communicating to connector: Client error: Received a non XML metadata response. If you have any query parameters in the application service path (such as $format), please remove them from the application service path and retry. SAP error message: The entity name 
must immediately follow the '&' in the entity reference.

Terraform Configuration Files

Terraform v1.8.1 on windows_386

Steps to Reproduce

Terraform v1.8.1 on windows_386

Debug Output

Terraform v1.8.1 on windows_386

Panic Output

Terraform v1.8.1 on windows_386

Important Factoids

No response

References

No response

Would you like to implement a fix?

None

github-actions[bot] commented 6 months ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue

justinretzolk commented 6 months ago

Hey @nsb413 👋 Thank you for taking the time to raise this! Are you able to supple debug logging and/or samples of values similar to what are being supplied to the variables in the sample configuration? This seems as if it could be configuration specific, so that type of information might be crucial to whoever picks this up.

nsb413 commented 6 months ago

Hi @justinretzolk, I will look into the issue and see if it is due to supplied values. Will get back to you on this.

mlnrt commented 5 months ago

We have the same issue and I can relate it to the disableSSO option that Terraform in not implementing. When I try to create the flow with Terraform it fails (disableSSO defaults to false). If I manually try to create the flow with the console with disableSSO = false, it fails with the same error. If I manually try to create the flow with the console with disableSSO = true, it works.