-
Notifications
You must be signed in to change notification settings - Fork 5
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
[BUG] aci_subnet_id is documented as optional but module fails if not specified #5
Comments
Workaround failureI have tried an obvious workaround: create a dummy vnet and subnet with required delegation for ACI, so I can plug in module "bug_network_vnet" {
source = "claranet/vnet/azurerm"
version = "~> 5.2.0"
environment = var.environment
location = module.azure_region.location
location_short = module.azure_region.location_short
client_name = var.owner
stack = var.stack
resource_group_name = module.resource_group.resource_group_name
vnet_cidr = ["10.0.1.0/26"]
}
module "bug_network_route_table" {
source = "claranet/route-table/azurerm"
version = "~> 5.2.0"
client_name = var.owner
environment = var.environment
stack = var.stack
location = module.azure_region.location
location_short = module.azure_region.location_short
resource_group_name = module.resource_group.resource_group_name
}
module "bug_aci_subnet" {
source = "claranet/subnet/azurerm"
version = "6.2.0"
client_name = var.owner
environment = var.environment
location_short = module.azure_region.location_short
resource_group_name = module.resource_group.resource_group_name
stack = var.stack
custom_subnet_name = "BugAciSubnet"
virtual_network_name = module.remote_state_stack_network.result.spoke_virtual_network.virtual_network_name
subnet_cidr_list = ["10.0.1.0/28"]
subnet_delegation = {
app-service-plan = [
{
name = "Microsoft.ContainerInstance/containerGroups"
actions = ["Microsoft.Network/virtualNetworks/subnets/action"]
}
]
}
route_table_name = module.bug_network_route_table.route_table_name
} but this just opens the pandora's box of further requirements:
So, I don't see any usable workaround for this issue, until the bug (regression) is fixed and presumably 7.0.1 is released. |
Hello ! Thanks for reporting the issue. I've pushed a fix on the branch AZ-1305-fix-variable-bug. Can you test with our code and let me know if it works for you ? Thanks. |
@jmapro Thanks for taking the action. TL;TR: I'm happy to confirm your fix works for me. In details, I have just tested your fix:
To double-check, I switched to the latest version of module available from the Hashicorp registry: module "aks" {
source = "claranet/aks-light/azurerm"
version = "~> 7.0.1"
...
} then, re-run Terraform
|
Thanks for the confirmation. This fix will pass our internal review this week and if everything is good will be released by the end of the week. |
Thank you @jmapro |
Fixed * [GITHUB-5](#5 (comment): Fix `aci_subnet_id` variable usage * [GITHUB-8](#8): Assign AcrPull role to kubelet identity
Released in v7.0.2 |
Community Note
Terraform Version
1.6.4
AzureRM Provider Version
3.78.0
Affected Resource(s)/Data Source(s)
azurerm_kubernetes_cluster, azapi_resource
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
The README.md says the
aci_subnet_id
is NOT required.The variable is also optional as per
terraform-azurerm-aks-light/variables-aks-light.tf
Lines 188 to 192 in ca2f620
I expect to be able to omit the
aci_subnet_id
variable.Actual Behaviour
The variable is not optional as per the current implementation, see the debug dump above which says:
Steps to Reproduce
terraform plan
will succeeedterraform apply
will fail as in the debug dumpImportant Factoids
No response
References
No response
The text was updated successfully, but these errors were encountered: