fix(namespace): set location as top-level attribute on azapi_resource#179
Merged
matt-FFFFFF merged 3 commits intomainfrom Apr 22, 2026
Merged
fix(namespace): set location as top-level attribute on azapi_resource#179matt-FFFFFF merged 3 commits intomainfrom
matt-FFFFFF merged 3 commits intomainfrom
Conversation
1 task
|
Important The "Needs: Triage 🔍" label must be removed once the triage process is complete! Tip For additional guidance on how to triage this issue/PR, see the Terraform Issue Triage documentation. |
Agent-Logs-Url: https://github.com/Azure/terraform-azurerm-avm-res-containerservice-managedcluster/sessions/4a279890-91e3-425a-b819-775360f46a20 Co-authored-by: matt-FFFFFF <16320656+matt-FFFFFF@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix managed namespace creation issue in AVM module
fix(namespace): set location as top-level attribute on azapi_resource
Apr 20, 2026
matt-FFFFFF
approved these changes
Apr 20, 2026
Member
|
@copilot run |
Agent-Logs-Url: https://github.com/Azure/terraform-azurerm-avm-res-containerservice-managedcluster/sessions/45864182-36fe-4462-b24e-cddead8b68e1 Co-authored-by: matt-FFFFFF <16320656+matt-FFFFFF@users.noreply.github.com>
Contributor
Author
Ran |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Creating a managed namespace via the module failed with
400 LocationRequiredbecause thenamespacesub-module only embeddedlocationinside the requestbodyofazapi_resource, which the provider does not forward as the resource's location.Changes
modules/namespace/main.tf: setlocation = var.locationas a top-level attribute onazapi_resource.this, matching the pattern used by the parent cluster inmain.tf.modules/namespace/locals.tf: drop the now-redundantlocationkey fromlocal.resource_body.The user-reported config (
namespace = { ns1 = { name = "...", location = "germanywestcentral", annotations = {...} } }) already plumbslocationthroughmain.namespace.tfinto the sub-module, so no caller-side changes are needed.