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

Repository for 'Public IP address' AVM module
MIT License
2 stars 5 forks source link

[telemetry]: generates `random_id` resources when telemetry is disabled #43

Open ZdenekPesek opened 1 month ago

ZdenekPesek commented 1 month ago

Check for previous/existing GitHub issues

Issue Type?

Bug

(Optional) Module Version

No response

(Optional) Correlation Id

No response

Description

Hello,

on the first place thank you for doing the AVM project at all! Very appreciated.

Anyway I have some struggles with the usage as with below terraform config

module "pip" {
  source = "git::https://github.com/Azure/terraform-azurerm-avm-res-network-publicipaddress?ref=v0.1.0"
...
  enable_telemetry = false
}

It still creates resource

module.pip["pip"].random_id.telem[0] will be created
  + resource "random_id" "telem" {          
      + b64_std     = (known after apply)   
      + b64_url     = (known after apply)
      + byte_length = 4
      + dec         = (known after apply)
      + hex         = (known after apply)
      + id          = (known after apply)
    }

I noticed there is inconsistency in enable_telemetry count usage. I don't think it is necessary. I understand the resource is harmless and has no influence there but still why to have it created when it is not needed on the first place. Is there any reason behind this?

Also would not make sense to have the telemetry disabled by default and let the consument opt-in instead?

Thank you Zdenek

prjelesi commented 1 month ago

@ZdenekPesek let me check with team and get back to you. Tnx!