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

Omitting default_action should result in a deployment failure. #4006

Closed
cvandal opened this issue Aug 5, 2019 · 2 comments · Fixed by #4037
Closed

Omitting default_action should result in a deployment failure. #4006

cvandal opened this issue Aug 5, 2019 · 2 comments · Fixed by #4037

Comments

@cvandal
Copy link

cvandal commented Aug 5, 2019

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform (and AzureRM Provider) Version

Terraform: 0.12.6
Provider: 1.32.1

Affected Resource(s)

  • azurerm_storage_account

Terraform Configuration Files

resource "azurerm_storage_account" "storage_account" {
  depends_on               = [""]

  name                     = ""
  location                 = ""
  resource_group_name      = ""
  account_tier             = "Standard"
  account_kind             = "StorageV2"
  account_replication_type = "RAGRS"

  network_rules {
    ip_rules                   = [""]
    virtual_network_subnet_ids = [""]
  }
}

Debug Output

Panic Output

Expected Behavior

If the required attribute default_action within the network_rules section is omitted, Terraform should fail to deploy.

Initially we never used this attribute and our Azure Storage Accounts were not publically accessible. We only noticed recently that it's no longer the case. After reviewing the provider documentation we became aware of the required default_action attribute which we did not have, and although it's required, our deployments have been successful.

Actual Behavior

Successful deployment. I assume that if it's omitted, it defaults to Allow.

Steps to Reproduce

  1. terraform apply

Important Factoids

References

  • #0000
@philbal611
Copy link
Contributor

philbal611 commented Aug 7, 2019

Here to confirm that omitting this attribute does set the value to Allow. All subsequent plans result in a limbo-state of "changes":

~ azurerm_storage_account.test
      network_rules.0.default_action: "Allow" => ""

@ghost
Copy link

ghost commented Sep 8, 2019

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 👉 [email protected]. Thanks!

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

Successfully merging a pull request may close this issue.

3 participants