ResourceModules icon indicating copy to clipboard operation
ResourceModules copied to clipboard

[Feature Request]: Discuss rolling out the <<resourceGroupName>> token across all pipeline parameter files

Open ahmadabdalla opened this issue 3 years ago • 4 comments

Description

We currently support a token called <<resourceGroupName> which is replaced by the resourceGroupName variable in the global variables YAML.

If someone wants to change the resource group name to not be validation-rg, then they'd need to update all pipelines to do that as it is hardcoded in the parameter files.

Should we roll this token out to all parameter files to allow changing the resource group name without impacting the parameter files?

ahmadabdalla avatar May 05 '22 10:05 ahmadabdalla

Ideally, it should be fully dynamic so that we have automation to just make all the variables in the global.variable.yml file available as tokens.

The changes you have here was initially requested in #953 and #807. Would be great to have all combined into one, available as tokens or variables in the pipeline/workflows.

Could we however call the variable something along the lines of validationRGName so its aligned with the rest of the variables? So that the current...

  resourceGroupName: 'validation-rg' # The default resource group to test deployment resources into

Becomes:

  validationRGName: 'validation-rg' # The default resource group to test deployment resources into

Maybe we should also call the global.variables.yml -> settings.yml and move enableDefaultTelemetry to this file as the #1440 might render the "namePrefix" obsolete.

MariusStorhaug avatar Jun 26 '22 11:06 MariusStorhaug

@MariusStorhaug global.variables.yml will be settings.yml as per your suggestion.

ahmadabdalla avatar Jul 08 '22 02:07 ahmadabdalla

@MariusStorhaug on your point: Ideally, it should be fully dynamic so that we have automation to just make all the variables in the global.variable.yml file available as tokens.

In the case of GitHub, we are taking the whole file and injecting it as environment variables. Is the above alluding to taking each environment variable, appending the token prefix and suffix and then searching for it in the file? like this:

<<envVariable1>>

ahmadabdalla avatar Jul 08 '22 02:07 ahmadabdalla

@ahmadabdalla, then I think I was unaware of how the tokens were made available in the piepline/workflows. My bad. You can disregard the point made on making them automatically available as env vars.

MariusStorhaug avatar Aug 01 '22 09:08 MariusStorhaug

While I think this could be enabled at any time - I wonder if it is still relevant once the new dependency approach #1791 is merged for all modules. There, the resource group name is usually passed as a reference in to the test.

Any thoughts @ahmadabdalla ? I guess it wouldn't hurt to have the replacement anyhow? :D

AlexanderSehr avatar Sep 30 '22 18:09 AlexanderSehr

@MrMCake with a recent feedback I got from a carml customer is that changing the RG name on the settings.yml doesn't reflect in the parameter files. Would there still be any use cases for the dependency pipelines to continue to be supported? If yes, then maybe we can roll this out?

ahmadabdalla avatar Sep 30 '22 21:09 ahmadabdalla

If yes, then maybe we can roll this out?

Currently, there would not be a use case for the dependency pipeline to be supported in the future.

AlexanderSehr avatar Oct 04 '22 16:10 AlexanderSehr

@MrMCake then we can close this ticket if there is no longer a need for it

ahmadabdalla avatar Oct 04 '22 21:10 ahmadabdalla

Moving back to needs triage to agree on this closure. I'd anyway suggest to open a new issue to remove the resource group parameter from settings.yml and all related utility referencies.

eriqua avatar Oct 05 '22 21:10 eriqua

@eriqua please create the new issue as proposed and close the issue

rahalan avatar Oct 11 '22 16:10 rahalan

Created issue #2204 as agreed. Closing as not planned.

eriqua avatar Oct 11 '22 18:10 eriqua