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

Storage Account Network Rules should be Separated #4186

Closed
derekrprice opened this issue Aug 29, 2019 · 3 comments
Closed

Storage Account Network Rules should be Separated #4186

derekrprice opened this issue Aug 29, 2019 · 3 comments
Labels
duplicate new-virtual-resource Resources which are split out to enhance the user experience service/network-security service/storage

Comments

@derekrprice
Copy link

derekrprice commented Aug 29, 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.11
AzureRM 1.30

Affected Resource(s)

  • azurerm_storage_account

Terraform Configuration Files

resource "azurerm_storage_account" "tdp-function-storage" {
  name                = "tdpfuncstore"
  resource_group_name = "${var.resource_group_name}"

  location                 = "${var.location}"
  account_tier             = "Standard"
  account_replication_type = "LRS"
  enable_https_traffic_only = true
  enable_advanced_threat_protection = true

# Can't do this due to a circular reference.  Functions need the connection string from this account
  network_rules {
    ip_rules                   = ["${azurerm_function_app.tdp.outbound_ip_addresses}"]
    virtual_network_subnet_ids = ["${var.subnet_id}"]
    default_action             = "Deny"
  }

  tags = "${var.tags}"
}

resource "azurerm_function_app" "tdp" {
  name                      = "test-azure-functions"
  location                  = "${var.location}"
  resource_group_name       = "${var.resource_group_name}"
  app_service_plan_id       = "${var.consumption_id}"
  storage_connection_string = "${azurerm_storage_account.tdp-function-storage.primary_connection_string}"
}

Expected Behavior

The storage and function resources should both have been created, with the appropriate network rules.

Actual Behavior

Terraform exited with an error message about circular references.

Steps to Reproduce

  1. terraform apply

Important Factoids

I think the storage network rules need to be separated into a separate resource. Then it could appear separately and source both the parent storage container and the function resource without creating a circular reference.

@tombuildsstuff tombuildsstuff added duplicate new-virtual-resource Resources which are split out to enhance the user experience service/network-security service/storage labels Aug 29, 2019
@tombuildsstuff
Copy link
Contributor

hi @derekrprice

Thanks for opening this issue :)

Taking a look through this appears to be a duplicate of #3522 - rather than having multiple issues open tracking the same thing I'm going to close this issue in favour of that one; would you mind subscribing to #3522 for updates?

Thanks!

@derekrprice
Copy link
Author

Done. Thanks, @tombuildsstuff!

@ghost
Copy link

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

No branches or pull requests

2 participants