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 Crash when no certificate_permissions present #376

Closed
civascu opened this issue Sep 29, 2017 · 2 comments
Closed

Terraform Crash when no certificate_permissions present #376

civascu opened this issue Sep 29, 2017 · 2 comments

Comments

@civascu
Copy link

civascu commented Sep 29, 2017

For an older tf file that creates a KeyVault but does not specify a certificate_permissions key, tf crashes when trying to compute the plan.

Since the certificate_permissions node is a new one, and optional, this should work. In addition, even having a node will fail when the count of permissions for the key and certificates is different, due to a code bug - it uses the Permissions.Keys property to compute the list of permissions for the certificates

Terraform Version

Terraform v0.10.5

Affected Resource(s)

  • azurerm_key_vault

Terraform Configuration Files

Excerpt from a larger .tf file:

resource "azurerm_key_vault" "test-kv" {
  location = "southeastasia"
  name = "test-kv"
  resource_group_name = "kv-group"
  "sku" {
    name = "standard"
  }
  tenant_id = "${data.azurerm_client_config.current.tenant_id}"
  
  access_policy {
    key_permissions = ["encrypt"]
    object_id = "${var.sp_obj_id}"
    secret_permissions = ["get"]
    tenant_id = "${data.azurerm_client_config.current.tenant_id}"
  }
}

Debug Output

Panic Output

https://gist.github.com/civascu/4d0151574944503a0c2d25da6b6ec850

Expected Behavior

terraform plan to complete

Actual Behavior

Terraform crash

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform plan

Important Factoids

References

PR that fixes the issue: #374

@tombuildsstuff
Copy link
Contributor

Fixed via #374 (thanks for this issue + sending the PR to fix it 😄)

@ghost
Copy link

ghost commented Apr 1, 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 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!

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

No branches or pull requests

2 participants