Azure / terraform-azurerm-avm-ptn-virtualwan

MIT License
6 stars 15 forks source link

[AVM Module Issue]: Module does not consistently return child objects as outputs #63

Open philipstreet opened 5 months ago

philipstreet commented 5 months ago

Check for previous/existing GitHub issues

Issue Type?

Bug

(Optional) Module Version

0.4.0

(Optional) Correlation Id

No response

Description

Issue The module returns child objects inconsistently. This is what is returned for each child object.

The AVM specification (https://azure.github.io/Azure-Verified-Modules/specs/terraform/#id-tffr2---category-outputs---additional-terraform-outputs) calls for "Full Resource Objects" to be returned.

Proposal The Full Resource Object be returned for the main and child resources, such as;

output "firewalls" {
  description = "Firewall Objects"
  value = {
    for firewall in azurerm_firewall.fw :
    firewall.name => {
      id = firewall.id
      firewall = firewall
    }
  }
}

output "er_gateways" {
  description = "ExpressRoute Gateway Resource Objects"
  value = {
    for gw in azurerm_express_route_gateway.express_route_gateway :
    gw.name => {
      id = gw.id
      gw = gw
    }
  }
}

output "virtual_hubs" {
  description = "Virtual Hub Resource Objects"
  value = {
    for hub in azurerm_virtual_hub.virtual_hub :
    hub.name => {
      id = hub.id
      hub = hub
    }
  }
}

output "p2s_vpn_gws" {
  description = "P2S VPN Gateway Resource Objects"
  value = {
    for gw in azurerm_point_to_site_vpn_gateway.p2s_gateway :
    gw.name => {
      id = gw.id
      gw = gw
    }
  }
}

output "s2s_vpn_gws" {
  description = "S2S VPN Gateway Resource Objects"
  value = {
    for gw in azurerm_vpn_gateway.vpn_gateway :
    gw.name => {
      id = gw.id
      gw = gw
    }
  }
}
microsoft-github-policy-service[bot] commented 5 months ago

[!IMPORTANT] The "Needs: Triage :mag:" label must be removed once the triage process is complete!

[!NOTE] This label was added as per ITA06.

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

[!NOTE] The "Type: Bug :bug:" label was added as per ITA21.

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

[!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]

  • To prevent further actions to take effect, the "Status: Response Overdue 🚩" label must be removed, once this issue has been responded to.
  • To avoid this rule being (re)triggered, the ""Needs: Triage :mag:" label must be removed as part of the triage process (when the issue is first responded to)!

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

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

[!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]

  • To prevent further actions to take effect, the "Status: Response Overdue 🚩" label must be removed, once this issue has been responded to.
  • To avoid this rule being (re)triggered, the ""Needs: Triage :mag:" label must be removed as part of the triage process (when the issue is first responded to)!

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

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

[!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]

  • To avoid this rule being (re)triggered, the "Needs: Triage :mag:" and "Status: Response Overdue :triangular_flag_on_post:" labels must be removed when the issue is first responded to!
  • Remove the "Needs: Immediate Attention :bangbang:" label once the issue has been responded to.

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

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

[!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]

  • To prevent further actions to take effect, the "Status: Response Overdue 🚩" label must be removed, once this issue has been responded to.
  • To avoid this rule being (re)triggered, the ""Needs: Triage :mag:" label must be removed as part of the triage process (when the issue is first responded to)!

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

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

[!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]

  • To avoid this rule being (re)triggered, the "Needs: Triage :mag:" and "Status: Response Overdue :triangular_flag_on_post:" labels must be removed when the issue is first responded to!
  • Remove the "Needs: Immediate Attention :bangbang:" label once the issue has been responded to.

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

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

[!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]

  • To prevent further actions to take effect, the "Status: Response Overdue 🚩" label must be removed, once this issue has been responded to.
  • To avoid this rule being (re)triggered, the ""Needs: Triage :mag:" label must be removed as part of the triage process (when the issue is first responded to)!
microsoft-github-policy-service[bot] commented 2 months ago

[!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]

  • To avoid this rule being (re)triggered, the "Needs: Triage :mag:" and "Status: Response Overdue :triangular_flag_on_post:" labels must be removed when the issue is first responded to!
  • Remove the "Needs: Immediate Attention :bangbang:" label once the issue has been responded to.
matt-FFFFFF commented 2 months ago

Hi,

We don't recommend to output the entire resource object any more.

Key reasons being that any sensitive property will mark the whole output as sensitive, causing no end of issues.

Also output schema may change with provider updates.

We now recommend outputting only computed attributes alongside name and resource id.