This page describes how to add a version to an existing parameter template. A template version contains the structural data in YAML or JSON format with variables that are placeholders for instance-specific values.
Required roles
To get the permission that
you need to add a parameter template version,
ask your administrator to grant you the
Parameter Manager Template Version Manager (roles/parametermanager.templateVersionManager) IAM role on the project, folder, or organization.
For more information about granting roles, see Manage access to projects, folders, and organizations.
This predefined role contains the
parametermanager.templateVersions.create
permission,
which is required to
add a parameter template version.
You might also be able to get this permission with custom roles or other predefined roles.
Add variables to your template
You can define variables in your template version by using dot notation enclosed in double curly braces.
- For key-value pairs, use
{{.key}}. For example,{{.cpuCount}}or{{.env}}. - For nested values, use lookups in
{{.key1.key2}}format. For example,{{.database.port}}or{{.market.dataProviderName}}.
When you render the template, Parameter Manager substitutes the variables with the values from the parameter version.
Add a parameter template version
Parameter Manager lets you create multiple versions of a parameter template. Each version contains the structural data of the configuration. To add a parameter template version, use one of the following methods:
Global parameters
Console
-
In the Google Cloud console, go to the Parameter Manager page.
-
Navigate to the Templates tab. You'll see the list of templates for that project.
-
Select the parameter template, and then click the Versions tab.
-
Click Create version. The Create template version page appears.
-
Enter the version name. A template version name can be up to 63 characters long and can contain letters, numbers, dashes (-), and underscores (_). It can't begin with a dash.
-
In the Payload section, enter the template version payload. Alternatively, you can upload a file containing the template version value, and then edit the values in the payload editor. The template value must be in the format specified for the parameter template.
Ensure that the payload is a valid JSON or YAML object and follows the limitations listed above.
-
Click Create.
REST
Before using any of the request data, make the following replacements:
- PROJECT_ID: the Google Cloud project ID
- TEMPLATE_ID: the name of the parameter template
- TEMPLATE_VERSION_ID: the ID of the template version
- TEMPLATE_PAYLOAD: the Base64 encoded string corresponding to the data that you want to store within the parameter template version
HTTP method and URL:
POST https://parametermanager.googleapis.com/v1/projects/PROJECT_ID/locations/global/templates/TEMPLATE_ID/versions?template_version_id=TEMPLATE_VERSION_ID
Request JSON body:
{
"payload": {
"data": "TEMPLATE_PAYLOAD"
}
}
To send your request, choose one of these options:
curl
Save the request body in a file named request.json,
and execute the following command:
curl -X POST \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json; charset=utf-8" \
-d @request.json \
"https://parametermanager.googleapis.com/v1/projects/PROJECT_ID/locations/global/templates/TEMPLATE_ID/versions?template_version_id=TEMPLATE_VERSION_ID"
PowerShell
Save the request body in a file named request.json,
and execute the following command:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method POST `
-Headers $headers `
-ContentType: "application/json; charset=utf-8" `
-InFile request.json `
-Uri "https://parametermanager.googleapis.com/v1/projects/PROJECT_ID/locations/global/templates/TEMPLATE_ID/versions?template_version_id=TEMPLATE_VERSION_ID" | Select-Object -Expand Content
You should receive a JSON response similar to the following:
{
"name": "projects/123456789012/locations/global/templates/payment_service_blueprint/versions/tv1",
"createTime": "2026-04-14T10:41:59.677512Z",
"updateTime": "2026-04-14T10:41:59.677512Z",
"disabled": false,
"payload": {
"data": "YmFzZTY0X2VuY29kZWRfcGF5bG9hZA=="
}
}
Regional parameters
Console
-
In the Google Cloud console, go to the Parameter Manager page.
-
Navigate to the Templates tab. You'll see the list of templates for that project.
-
Select the parameter template, and then click the Versions tab.
-
Click Create version. The Create template version page appears.
-
Enter the version name. A template version name can be up to 63 characters long and can contain letters, numbers, dashes (-), and underscores (_). It can't begin with a dash.
-
In the Payload section, enter the template version payload. Alternatively, you can upload a file containing the template version value, and then edit the values in the payload editor. The template value must be in the format specified for the parameter template.
Ensure that the payload is a valid JSON or YAML object and follows the limitations listed above.
-
Click Create.
REST
Before using any of the request data, make the following replacements:
- PROJECT_ID: the Google Cloud project ID
- LOCATION: the Google Cloud location of the parameter template
- TEMPLATE_ID: the name of the parameter template
- TEMPLATE_VERSION_ID: the ID of the template version
- TEMPLATE_PAYLOAD: the Base64 encoded string corresponding to the data that you want to store within the parameter template version
HTTP method and URL:
POST https://parametermanager.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/templates/TEMPLATE_ID/versions?template_version_id=TEMPLATE_VERSION_ID
Request JSON body:
{
"payload": {
"data": "TEMPLATE_PAYLOAD"
}
}
To send your request, choose one of these options:
curl
Save the request body in a file named request.json,
and execute the following command:
curl -X POST \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json; charset=utf-8" \
-d @request.json \
"https://parametermanager.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/templates/TEMPLATE_ID/versions?template_version_id=TEMPLATE_VERSION_ID"
PowerShell
Save the request body in a file named request.json,
and execute the following command:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method POST `
-Headers $headers `
-ContentType: "application/json; charset=utf-8" `
-InFile request.json `
-Uri "https://parametermanager.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/templates/TEMPLATE_ID/versions?template_version_id=TEMPLATE_VERSION_ID" | Select-Object -Expand Content
You should receive a JSON response similar to the following:
{
"name": "projects/123456789012/locations/us-central1/templates/payment_service_blueprint/versions/tv1",
"createTime": "2026-04-14T10:41:59.677512Z",
"updateTime": "2026-04-14T10:41:59.677512Z",
"disabled": false,
"payload": {
"data": "YmFzZTY0X2VuY29kZWRfcGF5bG9hZA=="
}
}