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

Sensitive values showing in plan #23315

Closed
tesharp opened this issue Nov 8, 2019 · 2 comments
Closed

Sensitive values showing in plan #23315

tesharp opened this issue Nov 8, 2019 · 2 comments

Comments

@tesharp
Copy link

tesharp commented Nov 8, 2019

Terraform Version

Terraform v0.12.13

Terraform Configuration Files

resource "azurerm_kubernetes_cluster" "aks" {
  name                            = "${var.name}-aks"
  location                        = azurerm_resource_group.aks.location
  resource_group_name             = azurerm_resource_group.aks.name
  dns_prefix                      = var.name
  kubernetes_version              = var.kubernetes_version
  api_server_authorized_ip_ranges = var.api_server_authorized_ip_ranges

 ...
}

Expected Behavior

When making a change and running terraform plan the plan should hide all sensitive values.

Actual Behavior

Running terraform plan on azurerm_kubernetes_cluster shows the kube_admin_config and kube_config sensitive values in clear text in plan. The kube_admin_config_raw is shown as sensitive value though. kube_admin_config[].password should be sensitive according to code (https://github.com/terraform-providers/terraform-provider-azurerm/blob/master/azurerm/resource_arm_kubernetes_cluster.go#L558)

Plan output:

  ~ resource "azurerm_kubernetes_cluster" "aks" {
        api_server_authorized_ip_ranges = []
        dns_prefix                      = "xxxx"
        enable_pod_security_policy      = true
        fqdn                            = "xxxx.azmk8s.io"
        id                              = "/subscriptions/xxxx/resourcegroups/xxxx-rg/providers/Microsoft.ContainerService/managedClusters/xxxx"
        kube_admin_config               = [
            {
                client_certificate     = "xxxxx"
                client_key             = "xxxxx"
                cluster_ca_certificate = "xxxxx"
                host                   = "https://xxxx.azmk8s.io:443"
                password               = "xxxxx"
                username               = "clusterAdmin_xxxx-rg_xxxx"
            },
        ]
        kube_admin_config_raw           = (sensitive value)
        kube_config                     = [
            {
                client_certificate     = ""
                client_key             = ""
                cluster_ca_certificate = "xxxx"
                host                   = "https://xxxx.azmk8s.io:443"
                password               = ""
                username               = "clusterUser_xxxx-rg_xxxx"
            },
        ]
        kube_config_raw                 = (sensitive value)

Steps to Reproduce

Make a change and run terraform plan. Output should show the sensitive value in clear text.

@hashibot
Copy link
Contributor

hashibot commented Nov 8, 2019

Hello! 🤖

This issue seems to be covering the same problem or request as hashicorp/terraform-plugin-sdk#201, so we're going to close it just to consolidate the discussion over there. Thanks!

@hashibot hashibot closed this as completed Nov 8, 2019
@ghost
Copy link

ghost commented Mar 29, 2020

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Mar 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants