-
Notifications
You must be signed in to change notification settings - Fork 9.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dx_gateway association import throws error #8956
Comments
@aacecandev Sorry about the problem here. |
The acceptance tests for $ make testacc TEST=./aws/ TESTARGS='-run=TestAccAwsDxGateway_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -parallel 20 -run=TestAccAwsDxGateway_ -timeout 120m
=== RUN TestAccAwsDxGateway_importBasic
=== PAUSE TestAccAwsDxGateway_importBasic
=== RUN TestAccAwsDxGateway_importComplex
=== PAUSE TestAccAwsDxGateway_importComplex
=== RUN TestAccAwsDxGateway_basic
=== PAUSE TestAccAwsDxGateway_basic
=== CONT TestAccAwsDxGateway_importBasic
=== CONT TestAccAwsDxGateway_basic
=== CONT TestAccAwsDxGateway_importComplex
--- PASS: TestAccAwsDxGateway_basic (39.35s)
--- PASS: TestAccAwsDxGateway_importBasic (42.12s)
--- FAIL: TestAccAwsDxGateway_importComplex (1408.90s)
testing.go:568: Step 1 error: 2 problems:
- error reading Direct Connect gateway association (ga-70e3def4-f9ae-41b5-81b0-add441cfeabavgw-00390591958ada8c6): DirectConnectClientException: Association ID has an invalid format.
status code: 400, request id: c471cce1-8d3b-11e9-818c-29febb0b2708
- error reading Direct Connect gateway association (ga-70e3def4-f9ae-41b5-81b0-add441cfeabavgw-0fd030f037255fd03): DirectConnectClientException: Association ID has an invalid format.
status code: 400, request id: c4715881-8d3b-11e9-afd5-038f18e4c385
FAIL
FAIL github.com/terraform-providers/terraform-provider-aws/aws 1408.986s
make: *** [testacc] Error 1 |
The fix for this regression has been merged and will release with version 2.16.0 of the Terraform AWS Provider, likely later this week. |
This has been released in version 2.16.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
Community Note
Terraform Version
Terraform v0.11.14
The detected bug behaves different depending on the aws provider version
Affected Resource(s)
Terraform Configuration Files
Debug Output
Importing the resource and making a terraform plan later using v2.11.0 would throw the following result
https://gist.github.com/aacecandev/3c15b3848126bc4b09a2c5c0cff4fde2#file-planl
Also, using v2.<12-13-14>.0 and making the same operation would fail importing the existing resources (I think it is related to some concat doing bad it's job but I'm don't feel comfortable yet with GO)
https://gist.github.com/aacecandev/e314042e8915ab32b302d91e52d46edf
Expected Behavior
Terraform's AWS latetest provider version should import successfully the current existing dx_gateway infrastructure, so when doing a
terrafom plan
, anything should be marked to destroyActual Behavior
I can import sucessfully a dx_gateway_association using provider's v2.11.0, :
aws_dx_gateway.dxgw-control: Importing from ID "313449a8-7ef4-4018-b78a-47c7db25f359"...
aws_dx_gateway.dxgw-control: Import complete!
Imported aws_dx_gateway (ID: 313449a8-7ef4-4018-b78a-47c7db25f359)
Imported aws_dx_gateway_association (ID: ga-313449a8-7ef4-4018-b78a-47c7db25f359vgw-0248c762c28e26447)
Imported aws_dx_gateway_association (ID: ga-313449a8-7ef4-4018-b78a-47c7db25f359vgw-0e7f7af297281a5ab)
Imported aws_dx_gateway_association (ID: ga-313449a8-7ef4-4018-b78a-47c7db25f359vgw-0af34dba6dc9bbd1f)
aws_dx_gateway_association.dxgw-control-1: Refreshing state... (ID: ga-313449a8-7ef4-4018-b78a-47c7db25f359vgw-0e7f7af297281a5ab)
aws_dx_gateway_association.dxgw-control: Refreshing state... (ID: ga-313449a8-7ef4-4018-b78a-47c7db25f359vgw-0248c762c28e26447)
aws_dx_gateway_association.dxgw-control-2: Refreshing state... (ID: ga-313449a8-7ef4-4018-b78a-47c7db25f359vgw-0af34dba6dc9bbd1f)
aws_dx_gateway.dxgw-control: Refreshing state... (ID: 313449a8-7ef4-4018-b78a-47c7db25f359)
Error: aws_dx_gateway.dxgw-control (import id: 313449a8-7ef4-4018-b78a-47c7db25f359): 3 errors occurred:
* import aws_dx_gateway_association.dxgw-control-2 result: ga-313449a8-7ef4-4018-b78a-47c7db25f359vgw-0af34dba6dc9bbd1f: aws_dx_gateway_association.dxgw-control-2: error reading Direct Connect gateway association (ga-313449a8-7ef4-4018-b78a-47c7db25f359vgw-0af34dba6dc9bbd1f): DirectConnectClientException: Association ID has an invalid format.
status code: 400, request id: 59c133da-8cf9-11e9-9323-cdbafefc00ac
* import aws_dx_gateway_association.dxgw-control result: ga-313449a8-7ef4-4018-b78a-47c7db25f359vgw-0248c762c28e26447: aws_dx_gateway_association.dxgw-control: error reading Direct Connect gateway association (ga-313449a8-7ef4-4018-b78a-47c7db25f359vgw-0248c762c28e26447): DirectConnectClientException: Association ID has an invalid format.
status code: 400, request id: 59c15aeb-8cf9-11e9-9323-cdbafefc00ac
* import aws_dx_gateway_association.dxgw-control-1 result: ga-313449a8-7ef4-4018-b78a-47c7db25f359vgw-0e7f7af297281a5ab: aws_dx_gateway_association.dxgw-control-1: error reading Direct Connect gateway association (ga-313449a8-7ef4-4018-b78a-47c7db25f359vgw-0e7f7af297281a5ab): DirectConnectClientException: Association ID has an invalid format.
status code: 400, request id: 59c133d9-8cf9-11e9-9323-cdbafefc00ac
Steps to Reproduce
aws-vault
terraform init
terraform import
dx_gatewayterraform plan
The text was updated successfully, but these errors were encountered: