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

Unable to define multiple additional_location on azurerm_api_management #4171

Closed
Ston9 opened this issue Aug 28, 2019 · 1 comment · Fixed by #4175
Closed

Unable to define multiple additional_location on azurerm_api_management #4171

Ston9 opened this issue Aug 28, 2019 · 1 comment · Fixed by #4175

Comments

@Ston9
Copy link

Ston9 commented Aug 28, 2019

Terraform (and AzureRM Provider) Version

  • TF 0.11.14
  • AzureRM 1.33.0

Affected Resource(s)

  • azurerm_api_management

Terraform Configuration

resource "azurerm_api_management" "apim" {
  name                = "${var.name}"
  location            = "${var.location}"
  resource_group_name = "${var.rg_name}"

  sku = ["${var.sku}"]

  additional_location {
    location = "brazilsouth"
  }
  additional_location {
    location = "eastus2"
  }
  additional_location {
    location = "southeastasia"
  }

  [...]

  tags = "${var.tags}"
}

Expected Behavior

Enable several additional_location on the Apim resource

Actual Behavior

"Error: module.api_management.azurerm_api_management.apim: additional_location: attribute supports 1 item maximum, config has 3 declared"

On the Terraform documentation we can find that additional_location can be one or more blocks :

additional_location - One or more additional_location blocks as documented below.

By searching in the code, I found this :

https://github.com/terraform-providers/terraform-provider-azurerm/blob/master/azurerm/resource_arm_api_management.go#L123

"additional_location": {
                Type:     schema.TypeList,
                Optional: true,
                MaxItems: 1,
[...]
}

This MaxItems variable should be removed to handle multiple additional_location I think.

@ghost
Copy link

ghost commented Sep 29, 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 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant