Closed jsoref closed 4 years ago
Fwiw, the distinction between []
, {}
and null
in:
- tags = [] -> null
and
- labels = {} -> null
is also fairly unhelpful.
I can file an extra bug about the fact that terraform claims it doesn't know what the project
will be, it seems strange for terraform to claim that it doesn't know the project:
~ project = "$PROJECT" -> (known after apply)
That is definitely a known quantity.
This:
+ name_prefix = (known after apply)
relates to #5284 -- I was trying to suppress that, but I can't, because attempting to do so triggers that error instead ...
The overall use case for this adventure is being able to easily recognize what is changing.
We're using terraform to make lots of changes, or few changes. But terraform massively multiplies the number of changes it reports to the point that it's hiding the needles in very large haystacks.
Ideally, if I make a single change -- as here I'm just adding a metadata.shutdown-script
, I should see a single change to that block (in this case, I'd also expect the metadata_fingerprint
change). If necessary, a note that the entire object is being replaced, but no other diff markers.
Having to review each and every line because the tool isn't smart enough to recognize that it isn't changing other things costs us a lot.
(I'm happy to write patches, or have someone else from our group write patches.)
@jsoref i think more than one issue is filed in this ticket. It would be helpful to track if you can open separate issues in future. Let me attempt to address it here and see ..
project=value
as part of resource config you wouldn't see the diff.If you would like to collaborate with us for patches/feature work please reach out to GCP representative for your account. They will help us engaged with your team
There is a project set, I excluded it from the config because it's private. It also isn't the core to my issue. The tags thing was an observation β I'm happy to file a bug for it.
Source image is the only thing this issue is for. I'm happy to have it marked as a duplicate.
Thank you @jsoref, will close it as its tracked on other issue
@venkykuberan which is?
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. If you feel I made an error π€ π , please reach out to my human friends π hashibot-feedback@hashicorp.com. Thanks!
Community Note
Terraform Version
Affected Resource(s)
Terraform Configuration Files
Original file:
Revised file:
Debug Output
--- show before switching to next file:
(TF_LOG=debug terraform plan >/dev/null) 2>&1 | mask-terraform-secrets
:Panic Output
Expected Behavior
Plan output should not include changes to
disk.source_image
Actual Behavior
plan output:
Steps to Reproduce
terraform plan
terraform apply
terraform show
terraform plan
Important Factoids
I have pre-existing manually created templates that I kind of like. I'd like to migrate to using terraform w/o losing their characteristics.
(Yes, I understand SCSI is the default today, and the terraform behavior is documented, but it clearly isn't required from gcloud's perspective.)
References
This is in the family of #5283 -- things which do not quite work the way I'd like in that I can't produce the output I'd like the way I'd like / there doesn't appear to be any way to do so using terraform.