Azure / bicep-registry-modules

Bicep registry modules
MIT License
474 stars 331 forks source link

[AVM Question/Feedback]: replace `secret` property with custom types #2070

Open ReneHezser opened 4 months ago

ReneHezser commented 4 months ago

Check for previous/existing GitHub issues

Description

Some modules that are using a property secureList within the secure parameter. An example is the container-app-job module here: https://github.com/Azure/bicep-registry-modules/blob/7f9c0893518f8df23c72733d9c8b64660c226a74/avm/res/app/job/tests/e2e/max/main.test.bicep#L74

This looks like a workaround which was needed in the past. We can now declare custom types and decorate a property with the @secure() tag to protect its value, instead of the whole security object. Something like this (I skipped the descriptions for readability):

type secretsType = {
  identity: string

  keyVaultUrl: string

  name: string

  @secure()
  value: string
}[]

This can be a breaking change, as the property for the module is then changed!

I see we have 5 modules that use a secureList like this and suggest they introduce a custom type instead of the secureList workaround.

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

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

[!TIP] For additional guidance on how to triage this issue/PR, see the BRM Issue Triage documentation.

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

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

[!WARNING] Tagging the AVM Core Team (@Azure/avm-core-team-technical-bicep) 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 ITA01BCP.