microsoft / microsoft/finops-toolkit

[Hubs] Resolve bicep warnings

Open
#1,761 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Tool: FinOps hubs
Dominant language
PowerShell
Stars
603
Forks
248
Avg merge
7d 11h
Merged PRs (30d)
11

Description

⚠️ Problem

When the Bicep module is built, the following warnings are shown:

  • finops-hub\modules\infrastructure.bicep(375,72) : Warning BCP318: The value of type "Microsoft.Network/virtualNetworks | null" may be null at the start of the deployment, which would cause this access expression (and the overall deployment with it) to fail. [https://aka.ms/bicep/core-diagnostics#BCP318]
  • finops-hub\modules\infrastructure.bicep(378,67) : Warning BCP318: The value of type "Microsoft.Network/virtualNetworks | null" may be null at the start of the deployment, which would cause this access expression (and the overall deployment with it) to fail. [https://aka.ms/bicep/core-diagnostics#BCP318]
  • finops-hub\modules\hub-storage.bicep(79,27) : Warning BCP318: The value of type "module | null" may be null at the start of the deployment, which would cause this access expression (and the overall deployment with it) to fail. [https://aka.ms/bicep/core-diagnostics#BCP318]
  • finops-hub\modules\hub-storage.bicep(110,81) : Warning BCP318: The value of type "module | null" may be null at the start of the deployment, which would cause this access expression (and the overall deployment with it) to fail. [https://aka.ms/bicep/core-diagnostics#BCP318]
  • finops-hub\modules\hub-storage.bicep(113,83) : Warning BCP318: The value of type "module | null" may be null at the start of the deployment, which would cause this access expression (and the overall deployment with it) to fail. [https://aka.ms/bicep/core-diagnostics#BCP318]
  • finops-hub\modules\hub-storage.bicep(116,90) : Warning BCP318: The value of type "module | null" may be null at the start of the deployment, which would cause this access expression (and the overall deployment with it) to fail. [https://aka.ms/bicep/core-diagnostics#BCP318]
  • finops-hub\modules\dataFactory.bicep(274,69) : Warning BCP318: The value of type "module | null" may be null at the start of the deployment, which would cause this access expression (and the overall deployment with it) to fail. [https://aka.ms/bicep/core-diagnostics#BCP318]
  • finops-hub\modules\dataFactory.bicep(286,15) : Warning BCP318: The value of type "Microsoft.KeyVault/vaults | null" may be null at the start of the deployment, which would cause this access expression (and the overall deployment with it) to fail. [https://aka.ms/bicep/core-diagnostics#BCP318]
  • finops-hub\modules\dataFactory.bicep(305,70) : Warning BCP318: The value of type "module | null" may be null at the start of the deployment, which would cause this access expression (and the overall deployment with it) to fail. [https://aka.ms/bicep/core-diagnostics#BCP318]
  • finops-hub\modules\dataFactory.bicep(336,74) : Warning BCP318: The value of type "module | null" may be null at the start of the deployment, which would cause this access expression (and the overall deployment with it) to fail. [https://aka.ms/bicep/core-diagnostics#BCP318]
  • finops-hub\modules\hub.bicep(191,67) : Warning BCP318: The value of type "module | null" may be null at the start of the deployment, which would cause this access expression (and the overall deployment with it) to fail. [https://aka.ms/bicep/core-diagnostics#BCP318]
  • finops-hub\modules\hub.bicep(192,96) : Warning BCP318: The value of type "module | null" may be null at the start of the deployment, which would cause this access expression (and the overall deployment with it) to fail. [https://aka.ms/bicep/core-diagnostics#BCP318]
  • finops-hub\modules\hub.bicep(193,65) : Warning BCP318: The value of type "module | null" may be null at the start of the deployment, which would cause this access expression (and the overall deployment with it) to fail. [https://aka.ms/bicep/core-diagnostics#BCP318]
  • finops-hub\modules\hub.bicep(194,101) : Warning BCP318: The value of type "module | null" may be null at the start of the deployment, which would cause this access expression (and the overall deployment with it) to fail. [https://aka.ms/bicep/core-diagnostics#BCP318]
  • finops-hub\modules\hub.bicep(195,114) : Warning BCP318: The value of type "module | null" may be null at the start of the deployment, which would cause this access expression (and the overall deployment with it) to fail. [https://aka.ms/bicep/core-diagnostics#BCP318]
  • finops-hub\modules\hub.bicep(196,74) : Warning BCP318: The value of type "module | null" may be null at the start of the deployment, which would cause this access expression (and the overall deployment with it) to fail. [https://aka.ms/bicep/core-diagnostics#BCP318]
  • finops-hub\modules\hub.bicep(381,62) : Warning BCP318: The value of type "module | null" may be null at the start of the deployment, which would cause this access expression (and the overall deployment with it) to fail. [https://aka.ms/bicep/core-diagnostics#BCP318]
  • finops-hub\modules\hub.bicep(421,66) : Warning BCP318: The value of type "module | null" may be null at the start of the deployment, which would cause this access expression (and the overall deployment with it) to fail. [https://aka.ms/bicep/core-diagnostics#BCP318]
  • finops-hub\modules\hub.bicep(424,97) : Warning BCP318: The value of type "module | null" may be null at the start of the deployment, which would cause this access expression (and the overall deployment with it) to fail. [https://aka.ms/bicep/core-diagnostics#BCP318]
  • finops-hub\modules\hub.bicep(427,99) : Warning BCP318: The value of type "module | null" may be null at the start of the deployment, which would cause this access expression (and the overall deployment with it) to fail. [https://aka.ms/bicep/core-diagnostics#BCP318]
  • finops-hub\modules\hub.bicep(430,87) : Warning BCP318: The value of type "module | null" may be null at the start of the deployment, which would cause this access expression (and the overall deployment with it) to fail. [https://aka.ms/bicep/core-diagnostics#BCP318]
  • finops-hub\modules\hub-app.bicep(81,26) : Warning BCP318: The value of type "Microsoft.DataFactory/factories | null" may be null at the start of the deployment, which would cause this access expression (and the overall deployment with it) to fail. [https://aka.ms/bicep/core-diagnostics#BCP318]
  • finops-hub\modules\hub-app.bicep(332,40) : Warning BCP318: The value of type "Microsoft.DataFactory/factories | null" may be null at the start of the deployment, which would cause this access expression (and the overall deployment with it) to fail. [https://aka.ms/bicep/core-diagnostics#BCP318]
  • finops-hub\modules\hub-database.bicep(37,24) : Warning use-secure-value-for-secure-inputs: Property 'scriptContent' expects a secure value, but the value provided may not be secure. [https://aka.ms/bicep/linter-diagnostics#use-secure-value-for-secure-inputs]
  • finops-hub\modules\infrastructure.bicep(375,72) : Warning BCP318: The value of type "Microsoft.Network/virtualNetworks | null" may be null at the start of the deployment, which would cause this access expression (and the overall deployment with it) to fail. [https://aka.ms/bicep/core-diagnostics#BCP318]
  • finops-hub\modules\infrastructure.bicep(378,67) : Warning BCP318: The value of type "Microsoft.Network/virtualNetworks | null" may be null at the start of the deployment, which would cause this access expression (and the overall deployment with it) to fail. [https://aka.ms/bicep/core-diagnostics#BCP318]
  • finops-hub\modules\hub-storage.bicep(79,27) : Warning BCP318: The value of type "module | null" may be null at the start of the deployment, which would cause this access expression (and the overall deployment with it) to fail. [https://aka.ms/bicep/core-diagnostics#BCP318]
  • finops-hub\modules\hub-storage.bicep(110,81) : Warning BCP318: The value of type "module | null" may be null at the start of the deployment, which would cause this access expression (and the overall deployment with it) to fail. [https://aka.ms/bicep/core-diagnostics#BCP318]
  • finops-hub\modules\hub-storage.bicep(113,83) : Warning BCP318: The value of type "module | null" may be null at the start of the deployment, which would cause this access expression (and the overall deployment with it) to fail. [https://aka.ms/bicep/core-diagnostics#BCP318]
  • finops-hub\modules\hub-storage.bicep(116,90) : Warning BCP318: The value of type "module | null" may be null at the start of the deployment, which would cause this access expression (and the overall deployment with it) to fail. [https://aka.ms/bicep/core-diagnostics#BCP318]
  • finops-hub\modules\dataFactory.bicep(274,69) : Warning BCP318: The value of type "module | null" may be null at the start of the deployment, which would cause this access expression (and the overall deployment with it) to fail. [https://aka.ms/bicep/core-diagnostics#BCP318]
  • finops-hub\modules\dataFactory.bicep(286,15) : Warning BCP318: The value of type "Microsoft.KeyVault/vaults | null" may be null at the start of the deployment, which would cause this access expression (and the overall deployment with it) to fail. [https://aka.ms/bicep/core-diagnostics#BCP318]
  • finops-hub\modules\dataFactory.bicep(305,70) : Warning BCP318: The value of type "module | null" may be null at the start of the deployment, which would cause this access expression (and the overall deployment with it) to fail. [https://aka.ms/bicep/core-diagnostics#BCP318]
  • finops-hub\modules\dataFactory.bicep(336,74) : Warning BCP318: The value of type "module | null" may be null at the start of the deployment, which would cause this access expression (and the overall deployment with it) to fail. [https://aka.ms/bicep/core-diagnostics#BCP318]
  • finops-hub\modules\hub.bicep(191,67) : Warning BCP318: The value of type "module | null" may be null at the start of the deployment, which would cause this access expression (and the overall deployment with it) to fail. [https://aka.ms/bicep/core-diagnostics#BCP318]
  • finops-hub\modules\hub.bicep(192,96) : Warning BCP318: The value of type "module | null" may be null at the start of the deployment, which would cause this access expression (and the overall deployment with it) to fail. [https://aka.ms/bicep/core-diagnostics#BCP318]
  • finops-hub\modules\hub.bicep(193,65) : Warning BCP318: The value of type "module | null" may be null at the start of the deployment, which would cause this access expression (and the overall deployment with it) to fail. [https://aka.ms/bicep/core-diagnostics#BCP318]
  • finops-hub\modules\hub.bicep(194,101) : Warning BCP318: The value of type "module | null" may be null at the start of the deployment, which would cause this access expression (and the overall deployment with it) to fail. [https://aka.ms/bicep/core-diagnostics#BCP318]
  • finops-hub\modules\hub.bicep(195,114) : Warning BCP318: The value of type "module | null" may be null at the start of the deployment, which would cause this access expression (and the overall deployment with it) to fail. [https://aka.ms/bicep/core-diagnostics#BCP318]
  • finops-hub\modules\hub.bicep(196,74) : Warning BCP318: The value of type "module | null" may be null at the start of the deployment, which would cause this access expression (and the overall deployment with it) to fail. [https://aka.ms/bicep/core-diagnostics#BCP318]
  • finops-hub\modules\hub.bicep(381,62) : Warning BCP318: The value of type "module | null" may be null at the start of the deployment, which would cause this access expression (and the overall deployment with it) to fail. [https://aka.ms/bicep/core-diagnostics#BCP318]
  • finops-hub\modules\hub.bicep(421,66) : Warning BCP318: The value of type "module | null" may be null at the start of the deployment, which would cause this access expression (and the overall deployment with it) to fail. [https://aka.ms/bicep/core-diagnostics#BCP318]
  • finops-hub\modules\hub.bicep(424,97) : Warning BCP318: The value of type "module | null" may be null at the start of the deployment, which would cause this access expression (and the overall deployment with it) to fail. [https://aka.ms/bicep/core-diagnostics#BCP318]
  • finops-hub\modules\hub.bicep(427,99) : Warning BCP318: The value of type "module | null" may be null at the start of the deployment, which would cause this access expression (and the overall deployment with it) to fail. [https://aka.ms/bicep/core-diagnostics#BCP318]
  • finops-hub\modules\hub.bicep(430,87) : Warning BCP318: The value of type "module | null" may be null at the start of the deployment, which would cause this access expression (and the overall deployment with it) to fail. [https://aka.ms/bicep/core-diagnostics#BCP318]
  • finops-hub\modules\hub-app.bicep(81,26) : Warning BCP318: The value of type "Microsoft.DataFactory/factories | null" may be null at the start of the deployment, which would cause this access expression (and the overall deployment with it) to fail. [https://aka.ms/bicep/core-diagnostics#BCP318]
  • finops-hub\modules\hub-app.bicep(332,40) : Warning BCP318: The value of type "Microsoft.DataFactory/factories | null" may be null at the start of the deployment, which would cause this access expression (and the overall deployment with it) to fail. [https://aka.ms/bicep/core-diagnostics#BCP318]
  • finops-hub\modules\hub-database.bicep(37,24) : Warning use-secure-value-for-secure-inputs: Property 'scriptContent' expects a secure value, but the value provided may not be secure. [https://aka.ms/bicep/

🛠️ Solution

Resolve the bicep warnings.

🙋‍♀️ Ask for the community

We could use your help:

  1. Please vote this issue up (👍) to prioritize it.
  2. Leave comments to help us solidify the vision.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by building the Bicep module and reviewing the reported locations in finops-hub/modules/infrastructure.bicep, hub-storage.bicep, dataFactory.bicep, hub.bicep, hub-app.bicep, and hub-database.bicep. Check the BCP318 and use-secure-value-for-secure-inputs diagnostics at those locations. Done means the module build no longer reports these warnings.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure
Domain
cloud, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.