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

Create a storage_account_network_rules resource #3522

Closed
MattMencel opened this issue May 24, 2019 · 8 comments
Closed

Create a storage_account_network_rules resource #3522

MattMencel opened this issue May 24, 2019 · 8 comments
Labels
new-resource new-virtual-resource Resources which are split out to enhance the user experience service/storage
Milestone

Comments

@MattMencel
Copy link
Contributor

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

Description

Create a azurerm_storage_account_network_rules resource so they can be managed separately from the azurerm_storage_account resource.

New or Affected Resource(s)

  • azurerm_storage_account_network_rules
  • azurerm_storage_account

Potential Terraform Configuration

resource "azurerm_storage_account_network_rules" "network_rules" {
  name = "network_rules
  storage_account = "${azurerm_storage_account.storage_account.id}"
  bypass = "None"
  ip_rules = "${var.myip}"
  virtual_network_subnet_ids = ["${var.my_vnet_list}"]
}

References

@tombuildsstuff tombuildsstuff added question service/storage new-resource new-virtual-resource Resources which are split out to enhance the user experience and removed question labels May 26, 2019
@lawrenae
Copy link
Contributor

we were looking into this (or similar) recently at work -- is what this is proposing effectively different than https://www.terraform.io/docs/providers/azurerm/r/storage_account.html#network_rules ?

@MattMencel
Copy link
Contributor Author

MattMencel commented Jun 26, 2019

I'm proposing a separate resource if possible. Similar to the way it works with azurerm_sql_firewall_rule. I've got a customer that would like to manage the network_rules outside of the storage_account resource. There's not a separate API for network_rules like there is for the sql firewall rules though.... so I'm hoping there's another way to make it work.

@evenh
Copy link
Contributor

evenh commented Jul 5, 2019

This functionality is very much needed, thanks for reporting and opening up a PR @MattMencel.

@derekrprice
Copy link

derekrprice commented Aug 29, 2019

See #4186 for an example of why this is needed. Currently, a storage account can't be created that allows access from the IPs from a Function App without creating a circular reference that Terraform can't resolve. Something similar would happen with any resource that can't be attached to a specific pre-existing virtual network or IP resource.

@geertn

This comment has been minimized.

@tombuildsstuff
Copy link
Contributor

Fixed via #5082

@ghost
Copy link

ghost commented Dec 7, 2019

This has been released in version 1.38.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azurerm" {
    version = "~> 1.38.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Jan 6, 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 Jan 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
new-resource new-virtual-resource Resources which are split out to enhance the user experience service/storage
Projects
None yet
Development

No branches or pull requests

7 participants