-
Notifications
You must be signed in to change notification settings - Fork 4k
Add -TemplateObject parameter to deployment cmdlets and re-record tests #8604
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add -TemplateObject parameter to deployment cmdlets and re-record tests #8604
Conversation
950ff2d
to
6536833
Compare
} | ||
else | ||
{ | ||
deployment.Properties.Template = JObject.Parse(JsonConvert.SerializeObject(parameters.TemplateObject)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we know that this is filled in at this point? Do our parameter sets require this to be non-empty if we reach this point?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@markcowl yes, -TemplateFile
, -TemplateUri
and -TemplateObject
are all mutually exclusive parameters, and parameters.TemplateFile
only has a value if the user provides a value to either one of the first two parameters, and parameters.TemplateObject
only has a value if the user provided a value to -TemplateObject
, so neither property should be null
when the user jumps into the respective block.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@markcowl just added the [ValidateNotNull]
attribute to the new -TemplateObject
parameter
@@ -81,7 +111,7 @@ function Test-CrossResourceGroupDeploymentFromTemplateFile | |||
$rgname = Get-ResourceGroupName | |||
$rgname2 = Get-ResourceGroupName | |||
$rname = Get-ResourceName | |||
$rglocation = "CentralUSEUAP" | |||
$rglocation = "West US 2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we fix this? If not, can we file an issue to fix this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cormacpayne added comment about fixing these hard-coded locations across ARM tests in the issue that was filed for the other Resources PR: #8678
Description
Fix for #2933
Checklist
CONTRIBUTING.md
platyPS
module