Open jongio opened 1 year ago
My thought is that we can have azd always supply those parameters at the command line instead of requiring them in a main.parameters.json file.
I think having main.parameters.json
default to something like this:
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"environmentName": {
"value": "${AZURE_ENV_NAME}"
},
"location": {
"value": "${AZURE_LOCATION}"
},
"principalId": {
"value": "${AZURE_PRINCIPAL_ID}"
}
}
}
When it is not present makes sense. I'm not sure about always passing these parameters, even when a main.parameters.json file is present. That feels like it is baking a lot of policy into the tool just based on parameter names than I am comfortable with.
Perhaps it also makes sense to default these values in the case where the file exists but does not define values for the environmentName, location and principalId values and the infrastructure requires them, so there's still a way for the user to override them.
We'd also probably want to do something similar for tfvar
files for the Terraform case, as well.
Note that in the bicepparam case, we couldn't support this - the bicepparam file requires all of these parameters to be defined in the file when it is compiled, as @vhvb1989 discovered when he implemented the feature.
We'd also probably want to do something similar for
tfvar
files for the Terraform case, as well.
This would be great! I have been adding empty *.tfvars.json
files to my tf folder as a workaround. Is this on the planning any time soon? I want to introduce azd as a local dev tool to work with our Terraform Modules in our company but adding empty files to make it work has been holding this back.
I'll take a look soon.
Right now main.parameters.json file is required.
It would be nice if it wasn't.
Scenario:
I want to tell someone to copy and paste main.bicep with as few steps as possible.
My main.parameters.json file is only the parameters that azd treats special.
My thought is that we can have azd always supply those parameters at the command line instead of requiring them in a main.parameters.json file.