Skip to content
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

terraform show PLANFILE does not include warnings #35885

Open
RachaelSTamakloe opened this issue Oct 21, 2024 · 1 comment
Open

terraform show PLANFILE does not include warnings #35885

RachaelSTamakloe opened this issue Oct 21, 2024 · 1 comment

Comments

@RachaelSTamakloe
Copy link

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

  1. terraform init
  2. terraform plan -out my.tfplan
  3. terraform show my.tfplan

Additional Context

No response

References

No response

@crw
Copy link
Collaborator

crw commented Nov 14, 2024

Thanks for this feature request! If you are viewing this issue and would like to indicate your interest, please use the 👍 reaction on the issue description to upvote this issue. We also welcome additional use case descriptions. Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants