terraform {
required_version = ">= 0.13.3"
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 3.6"
}
}
}
provider "aws" {
region = "us-east-1"
}
data aws_acm_certificate somecertificate {
domain = "somecertificate.example.com"
}
https://gist.github.com/daveshepherd/6b46ab6c443ae9089f1d2e9f32b36435
When running terraform plan or terraform apply repeatedly, no changes should be shown for this data object.
Each time terraform plan or terraform apply is run it flags up a change with the id field on the defined aws_acm_certificate data object. The id appears to be the current timestamp.
terraform initterraform applyterraform plan - changes are highlighted, despite only just applying terraform and no changes have been made to this certificate.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.
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
Please upvote and subscribe to those for further updates. 馃憤
@daveshepherd out of curiosity, does configuring most_recent = false in the data source help at all as a workaround? e.g.
data "aws_acm_certificate" "somecertificate" {
domain = "somecertificate.example.com"
most_recent = false
}
@bflad - I've set most_recent to both true and false and these changes are not longer highlighted. Thanks.
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.
@daveshepherd out of curiosity, does configuring
most_recent = falsein the data source help at all as a workaround? e.g.data "aws_acm_certificate" "somecertificate" { domain = "somecertificate.example.com" most_recent = false }
This worked for me, thanks!
Most helpful comment
@daveshepherd out of curiosity, does configuring
most_recent = falsein the data source help at all as a workaround? e.g.