-
Notifications
You must be signed in to change notification settings - Fork 956
Description
Bug Report
Package ./sdk/resourcemanager/resources/armresources shows the following documentation for DeploymentProperties.Parameters:
// Name and value pairs that define the deployment parameters for the template. You use this element when you want to provide
// the parameter values directly in the request rather than link to an existing
// parameter file. Use either the parametersLink property or the parameters property, but not both. It can be a JObject or
// a well formed JSON string.
Since JObject is not a golang concept, I have tried passing in a struct with json tags, and a json string. Both fail to actually set the parameters (default values are used). After some experimentation, and digging through test files, I found the following works for setting the parameter foo to a string value of "bar", though this doesn't seem to match the documentation:
armresources.Deployment{
Properties: &armresources.DeploymentProperties{
Template: template,
Parameters: map[string]interface{}{
"foo": map[string]string{
"value": "bar",
},
},
},
}
This was tested against version v1.2.0 (it's not clear to me what all the different versions in the subpackages represent, or how they relate).
go version go1.24.5 linux/arm64
If this is expected behavior, can we update the docs to reflect the proper way to set deployment parameters?