-
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
Data Source: aws_acm_certificate flagging up change to id field on every run #15199
Comments
Hi @daveshepherd, thank you for reporting this issue! There were some unexpected changes with data source handling that occurred in the Terraform CLI version 0.13.0 release that are causing this additional data source output in addition to the unstable id attribute in the output. There are now larger tracking issues for both sides of this so to consolidate efforts and discussions: hashicorp/terraform#25812 |
@daveshepherd out of curiosity, does configuring data "aws_acm_certificate" "somecertificate" {
domain = "somecertificate.example.com"
most_recent = false
} |
@bflad - I've set |
Okay great to hear there is at least a temporary workaround, thank you for following up. This is definitely a problem we would like to prevent going forward and we will provide additional updates as soon as we can. |
Thank you for the workaround! This was driving me crazy. |
This worked for me, thanks! |
This is possibly related to hashicorp/terraform-provider-tls#79, which is showing a very similar diff. |
Is anyone still having this problem after upgrading to version 3.10.0 or later of the Terraform AWS Provider? The |
Given the lack of response to my above question, I'm going to close this out as fixed. If you're still having this problem, please feel free to open a new issue and complete all of the information requested in the Bug Report template so that we can attempt to understand and reproduce the problem. |
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 CLI and Terraform AWS Provider Version
Affected Resource(s)
Terraform Configuration Files
Debug Output
https://gist.github.com/daveshepherd/6b46ab6c443ae9089f1d2e9f32b36435
Expected Behavior
When running
terraform plan
orterraform apply
repeatedly, no changes should be shown for this data object.Actual Behavior
Each time
terraform plan
orterraform apply
is run it flags up a change with theid
field on the defined aws_acm_certificate data object. The id appears to be the current timestamp.Steps to Reproduce
terraform init
terraform apply
terraform plan
- changes are highlighted, despite only just applying terraform and no changes have been made to this certificate.Important Factoids
This has only become apparent since moving to terraform 0.13, presumably because 'The terraform plan and terraform apply commands will now detect and report changes to root module outputs as needing to be applied even if there are no resource changes in the plan.' This was also present with the AWS provider version 2.55 when running with terraform 0.13.
'id' is not defined as an attribute in the documentation for the acm_certificate data source. However, the acm_certificate resource does define the 'id' attribute as 'The ARN of the certificate' which is inconsistent with the data object, if nothing else.
References
The text was updated successfully, but these errors were encountered: