Azure / terraform-azurerm-avm-res-network-natgateway

Terraform Module for Nat Gateway
MIT License
6 stars 5 forks source link

[AVM Module Issue]: πŸ› error about legacy module #32

Closed Laffs2k5 closed 7 months ago

Laffs2k5 commented 8 months ago

Check for previous/existing GitHub issues

Module specific issue

Issue Type?

Bug

(Optional) Module Version

0.1.0

(Optional) Correlation Id

No response

Description

Hi,

The currently latest release 0.1.0 includes provider configuration for azurerm in terraform.tf.

This results in errors like this from terraform during init:

Initializing modules...
Downloading registry.terraform.io/Azure/avm-res-network-natgateway/azurerm 0.1.0 for main.common_management.mgmt_outbound_nat_gw...
- main.common_management.mgmt_outbound_nat_gw in .terraform/modules/main.common_management.mgmt_outbound_nat_gw
β•·
β”‚ Error: Module is incompatible with count, for_each, and depends_on
β”‚ 
β”‚   on ../../main/main.tf line 540, in module "common_management":
β”‚  540:   for_each = var.common_management_network_configuration != null ? toset([var.environment]) : []
β”‚ 
β”‚ The module at module.main.module.common_management.module.mgmt_outbound_nat_gw is a legacy module which contains its own local provider configurations, and so calls to it may not use
β”‚ the count, for_each, or depends_on arguments.
β”‚ 
β”‚ If you also control the module "registry.terraform.io/Azure/avm-res-network-natgateway/azurerm", consider updating this module to instead expect provider configurations to be passed by
β”‚ its caller.
β•΅

I see that in commit 0ad7de3 the provider configuration was removed. The issue is that these changes were never included in a release.

Please consider releasing a new version of this module.

segraef commented 7 months ago

Hi @Laffs2k5, in the provider was removed from 0.1.0 to 0.1.1 and is reflected in the published version 0.1.1.

CC @mbilalamjad

microsoft-github-policy-service[bot] commented 7 months ago
microsoft-github-policy-service[bot] commented 7 months ago

[!IMPORTANT] @Laffs2k5, this issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

[!TIP] To prevent further actions to take effect, one of the following conditions must be met:

  • The author must respond in a comment within 3 days of this comment.
  • The "Status: No Recent Activity :zzz:" label must be removed.
  • If applicable, the "Status: Long Term :hourglass_flowing_sand:" or the "Needs: Module Owner :mega:" label must be added.

[!NOTE] This message was posted as per ITA04.

microsoft-github-policy-service[bot] commented 7 months ago

[!WARNING] @Laffs2k5, this issue will now be closed, as it has been marked as requiring author feedback but has not had any activity for 7 days.

[!TIP] In case this issue needs to be reopened (e.g., the author responds after the issue was closed), the "Status: No Recent Activity :zzz:" label must be removed.

[!NOTE] This message was posted as per ITA05.