hashicorp / terraform-provider-awscc

Terraform AWS Cloud Control provider
https://registry.terraform.io/providers/hashicorp/awscc/latest/docs
Mozilla Public License 2.0
262 stars 120 forks source link

awscc_dms_migration_project Provider produced inconsistent result after apply #1635

Open kstephensontm opened 7 months ago

kstephensontm commented 7 months ago

Community Note

Terraform CLI and Terraform AWS Cloud Control Provider Version

Affected Resource(s)

Terraform Configuration Files

Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.

# Copy-paste your Terraform configurations here - for large Terraform configs,
# please use a service like Dropbox and share a link to the ZIP file. For
# security, you can also encrypt the files using our GPG public key: https://keybase.io/hashicorp

Debug Output

Panic Output

│ Error: Provider produced inconsistent result after apply │ │ When applying changes to awscc_dms_migration_project.dms_migration_project, provider │ "provider[\"registry.terraform.io/hashicorp/awscc\"]" produced an unexpected new value: │ .source_data_provider_descriptors: planned set element │ cty.ObjectVal(map[string]cty.Value{"data_provider_arn":cty.UnknownVal(cty.String), │ "data_provider_identifier":cty.StringVal("arn:aws:dms:us-west-2:590183695615:data-provider:WOKMGXN3RZAM5I4CPZNBX4PJFM"), │ "data_provider_name":cty.StringVal("sc-sql-server"), │ "secrets_manager_access_role_arn":cty.StringVal("arn:aws:iam:::role/sc-secrets-manager-role"), │ "secrets_manager_secret_id":cty.StringVal("arn:aws:secretsmanager:us-west-2::secret:database/mssql-default..us-west-2.rds.amazonaws.com/dms_user--Rl6M5B")}) │ does not correlate with any element in actual. │ │ This is a bug in the provider, which should be reported in the provider's own issue tracker.

Expected Behavior

Creation of the dms migration project

Actual Behavior

Partial creation with the above error

Steps to Reproduce

resource "awscc_dms_migration_project" "dms_migration_project" { instance_profile_identifier = awscc_dms_instance_profile.dms_instance_profile.id migration_project_name = "sc-project2" #"${local.name}-migration-project" schema_conversion_application_attributes = { s3_bucket_path = "s3://-sc-s3-bucket" s3_bucket_role_arn = "arn:aws:iam:::role/sc-s3-role" } source_data_provider_descriptors = [ { data_provider_identifier = awscc_dms_data_provider.dms_data_provider_source.id data_provider_name = "sc-sql-server" secrets_manager_access_role_arn = "arn:aws:iam:::role/sc-secrets-manager-role" secrets_manager_secret_id = "arn:aws:secretsmanager:us-west-2::secret:database/mssql-default..us-west-2.rds.amazonaws.com/dms_user--Rl6M5B" }, ] target_data_provider_descriptors = [ { data_provider_identifier = awscc_dms_data_provider.dms_data_provider_target.id data_provider_name = "sc-postgresql" secrets_manager_access_role_arn = "arn:aws:iam:::role/sc-secrets-manager-role" secrets_manager_secret_id = "arn:aws:secretsmanager:us-west-2::secret:database/postgres-default/pssql_user-*****-Yy3dv6" }, ] }

  1. terraform apply

Important Factoids

no

References

https://registry.terraform.io/providers/hashicorp/awscc/latest/docs/resources/dms_migration_project

wellsiau-aws commented 6 months ago

related to #1586

kstephensontm commented 3 weeks ago

I just tried the latest version 1.18.0 to create a migration project (awscc_dms_migration_project) and getting this error. any ideas on how to get this to work? I am able to create this manually. the target is engine = "aurora_postgresql" which exists because the target was created.

│ Error: AWS SDK Go Service Operation Incomplete │ │ with awscc_dms_data_provider.dms_data_provider_target, │ on dms-schema-conversion.tf line 39, in resource "awscc_dms_data_provider" "dms_data_provider_target": │ 39: resource "awscc_dms_data_provider" "dms_data_provider_target" { │ │ Waiting for Cloud Control API service UpdateResource operation completion returned: waiter state transitioned to FAILED. │ StatusMessage: The specified database engine is not supported by DMS. Please choose a supported database engine and try │ again. (Service: DatabaseMigration, Status Code: 400, Request ID: 2b85813d-e4c5-443c-a79b-87be8031ffd2). ErrorCode: │ InvalidRequest

kstephensontm commented 3 weeks ago

It wants to update the engine for some reason but only aurora_postgresql works. when you try and use aurora-postgresql, it just errors out.

awscc_dms_data_provider.dms_data_provider_target will be updated in-place

~ resource "awscc_dms_data_provider" "dms_data_provider_target" {