Skip to content

Deployment Parameters not set following docs #25820

@therealmitchconnors

Description

@therealmitchconnors

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    MgmtThis issue is related to a management-plane library.customer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-author-feedbackWorkflow: More information is needed from author to address the issue.no-recent-activityThere has been no recent activity on this issue.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions