Terraform: Shorten the terraform plan output to only changes

Created on 15 Aug 2019  路  4Comments  路  Source: hashicorp/terraform

When doing the terraform plan command, a switch can be added to minify the output.

Today:

  # module.stg.azurerm_app_service.myaps will be updated in-place
  ~ resource "azurerm_app_service" "myaps" {
        app_service_plan_id            = "/subscriptions/xxxx/myaps"
      ~ app_settings                   = {
            "APPINSIGHTS_INSTRUMENTATIONKEY" = "xxx"
            "ASPNETCORE_ENVIRONMENT"         = "Staging"
          - "MSDEPLOY_RENAME_LOCKED_FILES"   = "1" -> null
            "WEBSITE_RUN_FROM_PACKAGE"       = "0"
        }
        client_affinity_enabled        = true
        client_cert_enabled            = false
        default_site_hostname          = "myaps.azurewebsites.net"
        enabled                        = true
        https_only                     = false

Proposed:

  # module.stg.azurerm_app_service.myaps will be updated in-place
  ~ resource "azurerm_app_service" "myaps" {
      ~ app_settings                   = {
          - "MSDEPLOY_RENAME_LOCKED_FILES"   = "1" -> null
        }
cli enhancement

Most helpful comment

let's get this in there, man! Try making a change to AWS ElasticBeanstalk and you get 5000 lines of things with only 1 or 2 differences, very hard to use terraform plan to assess impact of a change.

All 4 comments

We would like to see this feature as well. Currently the default output of azurerm_kubernetes_cluster shows the credentials for the clusterAdmin. This attribute doesn't change, nor do we ever want this displayed in our pipelines, as that's a massive security vulnerability. Anyone could modify their kubeconfig, paste the creds in there, and immediately have admin access to the cluster.

I'm not sure if that persists in the state as well but just thought that's worth mentioning.

Duplicates #21639, which has WIP in #22458.

Duplicates #21639, which has WIP in #22458.

And it looks like #21639 duplicates #10507

let's get this in there, man! Try making a change to AWS ElasticBeanstalk and you get 5000 lines of things with only 1 or 2 differences, very hard to use terraform plan to assess impact of a change.

Was this page helpful?
0 / 5 - 0 ratings