-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Fatal Crash on import of aws_acm_certificate.selfsignedcert resource (panic) #7103
Comments
Relevant portion of crash log:
The resource is currently always expecting |
…tiveNames Reference: #7103 Its possible to import certificates into ACM with an IP address CommonName, which leaves SubjectAlternativeNames empty in the API response. The resource previously assumed there was always one element in the list (the domain name). Previous output from acceptance testing: ``` === CONT TestAccAWSAcmCertificate_imported_IpAddress panic: runtime error: makeslice: cap out of range goroutine 437 [running]: github.com/terraform-providers/terraform-provider-aws/aws.cleanUpSubjectAlternativeNames(0xc000962fc0, 0x48ed811, 0x3, 0x3dbe1a0) /Users/bflad/go/src/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_acm_certificate.go:280 +0x71 github.com/terraform-providers/terraform-provider-aws/aws.resourceAwsAcmCertificateRead.func1(0xc000872cd0) /Users/bflad/go/src/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_acm_certificate.go:213 +0x284 ``` Output from acceptance testing: ``` --- PASS: TestAccAWSAcmCertificate_imported_IpAddress (14.29s) --- PASS: TestAccAWSAcmCertificate_imported_DomainName (22.19s) ```
Pull request submitted: #7127 |
The fix for this has been merged and will release with version 1.56.0 of the Terraform AWS provider, likely middle of this week. 👍 |
This has been released in version 1.56.0 of the 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! |
This issue was originally opened by @queerbsd as hashicorp/terraform#19957. It was migrated here as a result of the provider split. The original body of the issue is below.
Terraform Version
Terraform Configuration Files
Debug Output
https://gist.github.com/queerbsd/e1b4a5cf9361bc65cdb56a9a368c1e2a
Crash Output
Same, basically.
https://gist.github.com/queerbsd/e1b4a5cf9361bc65cdb56a9a368c1e2a
Expected Behavior
Import should have completed and the certificate reference should exist in the state file.
Actual Behavior
Crashed.
Steps to Reproduce
terraform import aws_acm_certificate.selfsignedcert <arn of just-imported ACM cert>
Additional Context
This is using MFA authenticated chain-role sessions to a member account when accessing the remote state file, via environment variables. Other than that it's quite vanilla.
References
The text was updated successfully, but these errors were encountered: