Add Network Contributor role assignments scoped to AKS nodepools subnets #327
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.
This PR creates a role assignment for the AKS Service Principal to be a Network Contributor on the subnets used for the AKS Cluster.
The AKS cluster identity has the Contributor role on the AKS second resource group (MC_myResourceGroup_myAKSCluster_eastus)
In this case no additional change is necessary.
However when using a custom VNET, the AKS cluster identity needs the Network Contributor role on the VNET subnets
used by the system node pool and by any additional node pools.
Docs:
This PR detects if a custom VNET is used looking at the values of the variable
var.vnet_subnet_ids
and at the value ofvnet_subnet_ids
in the map variable of the node pools.Issue number
Fixes #178
Checklist before requesting a review
CHANGELOG.md
file