作者:静风疾水 | 来源:互联网 | 2024-09-26 15:25
Fixes #3560
I tried to do what proposed in the issue (in this branch https://github.com/julienduchesne/terraform-provider-aws/tree/import-acm-certificates) but ran into a major issue. CustomizeDiff doesn't see fields if their value is from another resource (example: tls certificate resource). Therefore, plan-time field validation did not work in those cases. I opted for a new resource instead since the creation and update methods are different anyways. It also makes for a cleaner field description set (required and optional fields are clearly marked for both resource). I managed to reuse the Read method as well as the Delete.
Let me know what you think!
Output from acceptance testing:
1 2 3 4 5 6 7 8 9 10
| make testacc TESTARGS='-run=TestAccAWSAcmCertificateImported_selfSigned'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -run=TestAccAWSAcmCertificateImported_selfSigned -timeout 120m
? github.com/terraform-providers/terraform-provider-aws [no test files]
=== RUN TestAccAWSAcmCertificateImported_selfSigned
--- PASS: TestAccAWSAcmCertificateImported_selfSigned (35.83s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 35.851s
... |
该提问来源于开源项目:hashicorp/terraform-provider-aws
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!