GithubHelp home page GithubHelp logo

bicep-param-ignore-not-used's Introduction

Using Bicep I want to deploy resources using a superset of parameters main.parameters.json file.

If unused parameters are present the deployment currently fails:

InvalidTemplate - Deployment template validation failed: 'The template parameters 'paramNotUsed' in the parameters file are not valid; they are not present in the original template and can therefore not be provided at deployment time. The only supported parameters for this template are 'paramUsed'.

What we want

We want to be able to use a .parameters.json file that contains a parameter that is NOT used - at least not error, or have the option to change to a warning?

One option might be adding option for tooling to: ignore, warn, error (current behaviour) if unused parameters are being passed.

Why

From an Azure DevOps Pipelines variables we want to be able to store variables in x2 places:

  • Library Variable Sets using KeyVault for sensitive values
  • .env.parameters.json files for all other non sensitive values

We have multiple .bicep files that require different parameters .env.parameters.json and don't require all params.

Similar post here

[Feature Suggestion] Deployment Parameters: Allow unused paramaters in deployment

Azure/bicep#5771

Steps to Repro

Requires Azure CLI https://learn.microsoft.com/en-us/cli/azure/install-azure-cli

Clone Repo

In the Azure Portal > create new resource group called "param-play" or similar

Open Terminal or command prompt

Log into Azure using your credentials

az login automatic

OR

az login --use-device-code manual

Set your subscription - if required

az account set --subscription "YOUR SUBSCRIPTION"

az deployment group what-if --resource-group "param-play" -f "main.bicep" --parameters "main.parameters.json"

bicep-param-ignore-not-used's People

Watchers

Beau Holland avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.