Azure/terraform-azurerm-avm-res-containerregistry-registry

[AVM Module Issue]: Error: Output refers to sensitive values

Opened this issue · 4 comments

Check for previous/existing GitHub issues

  • I have checked for previous/existing GitHub issues

Issue Type?

Bug

(Optional) Module Version

v0.3.1

(Optional) Correlation Id

No response

Description

Terraform enforces that the Output "resource" should be annotate as sensitive. In the current version of the module, it gives me the following error:
image

Thanks for reporting this. I'll push a release next week to correct the output sensitivity

You opened a similar issue on one of our module, but it seems you're not using module the right way.
Main resource output shouldn't be set as sensitive.

Hi,
I have uploaded the information requested in the other module.
I'm using this module with Terragrunt with Terraform as binary.

As a workaround, Terragrunt has a "generate" block that allows to create a file. With this approach, a new outputs.tf file could be created with the desired modifications.
I added the following code to my terragrunt.hcl:

Terragrunt code ...
generate "outputs" {
  path      = "${get_terragrunt_dir()}/outputs.tf"
  if_exists = "overwrite"
  contents  = <<EOF
...
Here I copy + paste the content of outputs.tf and add sensitive = true to the "resource" output value
...
  EOF
}
terraform {
  source = "${include.envcommon.locals.base_source_url}?ref=v0.3.1"
}
inputs {
}