microsoft / cobalt

Infrastructure turn-key solution for app service workloads
MIT License
116 stars 78 forks source link

Pass subscription ID to Az CLI commands #327

Closed KeithJRome closed 4 years ago

KeithJRome commented 4 years ago

All Submissions:


What is the current behavior?


Some Azure CLI commands allow for default parameter values for Subscription ID, Resource Group Name, etc. Cobalt is currently not explicitly setting these parameters when the Terraform modules shell out to run direct Az commands. This does not seem to be causing problems on the current build servers (yet) but does have potential for build unpredictability as those parameters will fall back to configurable defaults from the context of the logged-in user.

Issue Number: #290

What is the new behavior?


Calls to the Azure CLI now explicitly pass the Subscription ID and Resource Group.

Does this introduce a breaking change?


Any relevant logs, error output, etc?


(If it’s long, please paste to https://ghostbin.com/ and insert the link here.)

Other information


ianphil commented 4 years ago

Should we have broken this into smaller chunks of work? This is a large, PR...

KeithJRome commented 4 years ago

@iphilpot the rebase from master was messy - I've cleaned up the commits now. This PR wasn't as big as the messy history made it look.

KeithJRome commented 4 years ago

Yes, these commits only targeted the inline local-exec blocks. I need to add the extra params to those program blocks also.