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

Argument storage_account not expected in azurerm_app_service #10435

Closed
oliverchristen opened this issue Feb 2, 2021 · 2 comments
Closed

Argument storage_account not expected in azurerm_app_service #10435

oliverchristen opened this issue Feb 2, 2021 · 2 comments

Comments

@oliverchristen
Copy link

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 v0.14.5
provider registry.terraform.io/hashicorp/azurerm v2.45.1

Affected Resource(s)

  • azurerm_app_service

Terraform Configuration Files

resource "azurerm_app_service" "app-grafana" {
  name                = "app-grafana"
  resource_group_name = var.resource_group_name
  location            = var.location
  app_service_plan_id = azurerm_app_service_plan.plan-grafana-iiot.id

  site_config {
    linux_fx_version = "DOCKER|grafana/grafana"
  }

  storage_account = [
    {
      name         = "grafanaData"
      account_name = azurerm_storage_account.bcaggrafana.name
      access_key   = azurerm_storage_account.bcaggrafana.primary_access_key
      type         = "AzureFiles"
      share_name   = "grafanaData"
      mount_path   = "/var/lib/grafana"
    }
  ]
}

Debug Output

Expected Behaviour

terraform apply should run successfully because storage_account should be supported for azurerm_app_service as described here: https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/app_service#storage_account

Actual Behaviour

Error occurs when executing terraform apply:

Error: Unsupported argument

  on main.tf line 21, in resource "azurerm_app_service" "app-grafana":
 21:   storage_account = [

An argument named "storage_account" is not expected here. Did you mean to
define a block of type "storage_account"?

Steps to Reproduce

  1. Configure azurerm_app_service as above
  2. Execute terraform apply
@oliverchristen
Copy link
Author

Ok, found the mistake in the config:

  storage_account {
    name         = "grafanaData"
    account_name = azurerm_storage_account.stbcaggrafana.name
    access_key   = azurerm_storage_account.stbcaggrafana.primary_access_key
    type         = "AzureFiles"
    share_name   = "grafanaData"
    mount_path   = "/var/lib/grafana"
  }

@ghost
Copy link

ghost commented Mar 5, 2021

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!

@hashicorp hashicorp locked as resolved and limited conversation to collaborators Mar 5, 2021
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