-
Notifications
You must be signed in to change notification settings - Fork 10k
Open
Labels
Description
Terraform Version
$ terraform -version
Terraform v1.9.8
on linux_amd64
Terraform Configuration Files
-Actual Context: GoogleCloudPlatform/cluster-toolkit#3131
Simpler config file for reproducibility:
In main.tf:
resource "google_compute_instance" "default" {
name = "test"
machine_type = "n1-standard-1"
zone = "us-central1-a"
project = "dev-pool-prj8"
tags = ["foo", "bar"]
boot_disk {
initialize_params {
image = "debian-cloud/debian-9"
}
}
// Local SSD disk
scratch_disk {
interface = "SCSI"
}
network_interface {
network = "default"
access_config {
// Ephemeral IP
}
}
}
# Check block outside the resource
check "instance_name_valid" {
assert {
condition = google_compute_instance.default.name != "test"
error_message = "Instance name cannot be 'test'."
}
}
Debug Output
https://gist.github.com/RachaelSTamakloe/9efdca0181602474c5657f00a25e4fbd
Expected Behavior
I expect the warning messages displayed in "terraform plan" to also be present in "terraform show PLANFILE," after it has been saved using "terraform plan -out PLANFILE"
Actual Behavior
"terraform show PLANFILE" fails to include warnings that are present in the output of terraform plan. When the output of terraform plan -out is saved in a PLANFILE and shown using "terraform show", warning messages that are originally present in terraform plan are not displayed in "terraform show PLANFILE".
Steps to Reproduce
terraform init
terraform plan -out my.tfplan
terraform show my.tfplan
Additional Context
No response
References
No response
tpdownes