-
Notifications
You must be signed in to change notification settings - Fork 32
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
[AVM Module Issue]: network
variable can be simplified, and needs a fix for resource group assumption
#146
Comments
network
variable can be simplified, and needs a fix for resource group assumption
Sure I'm currently going through a deployment where I'm switching from code for AKS Automatic to use this to deploy a standard cluster. There some alignment I'd like to land, will be raising issues to track it first. A gap for me is monitoring, I have mimicked the grafana and prometheus deployed by Automatic, is there interest in adding this as optional feature to this pattern? |
@kewalaka if I understand correctly you want to use Managed Prometheus and Managed Grafana. For Managed Prometheus in Terraform you need a Then the
I have a full example here. Now the design question is:
|
My code mimics the monitoring resource outputs of AKS Automatic, thus is similar but more comprehensive then the full example supplied. Regardless of whether it is created via a resource module or directly as resources, we should look for something more aligned to the implementation created by the automatic SKU, in my opinion. I was more looking for whether a PR along these lines would be accepted, I'll raise a separate issue in a while. |
Warning Tagging the AVM Core Team (@Azure/avm-core-team-technical-terraform) due to a module owner or contributor having not responded to this issue within 3 business days. The AVM Core Team will attempt to contact the module owners/contributors directly. Tip
|
Warning Tagging the AVM Core Team (@Azure/avm-core-team-technical-terraform) due to a module owner or contributor having not responded to this issue within 3 business days. The AVM Core Team will attempt to contact the module owners/contributors directly. Tip
|
Warning Tagging the AVM Core Team (@Azure/avm-core-team-technical-terraform) due to a module owner or contributor having not responded to this issue within 3 business days. The AVM Core Team will attempt to contact the module owners/contributors directly. Tip
|
Caution **This issue requires the AVM Core Team's (@Azure/avm-core-team-technical-terraform) immediate attention as it hasn't been responded to within 6 business days. ** Tip
|
Warning Tagging the AVM Core Team (@Azure/avm-core-team-technical-terraform) due to a module owner or contributor having not responded to this issue within 3 business days. The AVM Core Team will attempt to contact the module owners/contributors directly. Tip
|
Caution **This issue requires the AVM Core Team's (@Azure/avm-core-team-technical-terraform) immediate attention as it hasn't been responded to within 6 business days. ** Tip
|
Warning Tagging the AVM Core Team (@Azure/avm-core-team-technical-terraform) due to a module owner or contributor having not responded to this issue within 3 business days. The AVM Core Team will attempt to contact the module owners/contributors directly. Tip
|
Caution **This issue requires the AVM Core Team's (@Azure/avm-core-team-technical-terraform) immediate attention as it hasn't been responded to within 6 business days. ** Tip
|
@kewalaka hi did you get a chance to work on this? |
@nellyk please see my feedback in #161 - noting this didn't have merge conflicts when I raised it, and i've already resolved merge conflicts once. I'm happy to resolve them again but I'd like you know if the fixes are of interest, and whether you'd like monitoring split out, before I invest more time in contribution. What I raised in that PR is what I needed with a customer to get this to the point it had the necessary features enabled for production readiness. Please let me know how you'd like to proceed. |
Check for previous/existing GitHub issues
Issue Type?
Bug
(Optional) Module Version
0.20
(Optional) Correlation Id
No response
Description
The
name
andresource_group_name
inputs can be removed from this:terraform-azurerm-avm-ptn-aks-production/variables.tf
Lines 17 to 25 in 3005b77
I don't think the vnet name is being used, and the resource group name can be fetched from a subnet ID via a split, something like this:
Furthermore, when setting the Network Contributor role assignment we're assuming the vnet is in the same RG as the AKS cluster, which is not a certainty.
terraform-azurerm-avm-ptn-aks-production/main.tf
Lines 45 to 49 in 3005b77
..ln 47 should then point to
local.vnet_resource_group_name
Using the above approach also means you can drop the data source for the resource group:
terraform-azurerm-avm-ptn-aks-production/main.tf
Lines 36 to 38 in 3005b77
.... this reliance on a data source for resource group properties is an antipattern that should be avoided, as changes to RG properties can trigger "not known before apply" issues and resource re-creation.
The UAMI can just use
var.resource_group_name
.The text was updated successfully, but these errors were encountered: