Skip to main content

template_sync_configs

Creates, updates, deletes, gets or lists a template_sync_configs resource.

Overview

Nametemplate_sync_configs
TypeResource
Idaws.proton.template_sync_configs

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
branchstringThe repository branch.
repository_namestringThe repository name (for example, myrepos/myrepo). (pattern: <code>[A-Za-z0-9_.-]./[A-Za-z0-9_.-].</code>)
repository_providerstringThe repository provider. (GITHUB, GITHUB_ENTERPRISE, BITBUCKET)
subdirectorystringA subdirectory path to your template bundle version.
template_namestringThe template name. (pattern: <code>^[0-9A-Za-z]+[0-9A-Za-z_-]*$</code>)
template_typestringThe template type. (ENVIRONMENT, SERVICE)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_template_sync_configselectregionGet detail data for a template sync configuration.
create_template_sync_configinsertregion, branch, repositoryName, repositoryProvider, templateName, templateTypeSet up a template to create new template versions automatically by tracking a linked repository. A linked repository is a repository that has been registered with Proton. For more information, see CreateRepository. When a commit is pushed to your linked repository, Proton checks for changes to your repository template bundles. If it detects a template bundle change, a new major or minor version of its template is created, if the version doesn’t already exist. For more information, see Template sync configurations in the Proton User Guide.
update_template_sync_configupdateregion, branch, repositoryName, repositoryProvider, templateName, templateTypeUpdate template sync configuration parameters, except for the templateName and templateType. Repository details (branch, name, and provider) should be of a linked repository. A linked repository is a repository that has been registered with Proton. For more information, see CreateRepository.
delete_template_sync_configdeleteregionDelete a template sync configuration.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Get detail data for a template sync configuration.

SELECT
branch,
repository_name,
repository_provider,
subdirectory,
template_name,
template_type
FROM aws.proton.template_sync_configs
WHERE region = '{{ region }}' -- required
;

INSERT examples

Set up a template to create new template versions automatically by tracking a linked repository. A linked repository is a repository that has been registered with Proton. For more information, see CreateRepository. When a commit is pushed to your linked repository, Proton checks for changes to your repository template bundles. If it detects a template bundle change, a new major or minor version of its template is created, if the version doesn’t already exist. For more information, see Template sync configurations in the Proton User Guide.

INSERT INTO aws.proton.template_sync_configs (
branch,
repositoryName,
repositoryProvider,
subdirectory,
templateName,
templateType,
region
)
SELECT
'{{ branch }}' /* required */,
'{{ repositoryName }}' /* required */,
'{{ repositoryProvider }}' /* required */,
'{{ subdirectory }}',
'{{ templateName }}' /* required */,
'{{ templateType }}' /* required */,
'{{ region }}'
RETURNING
template_sync_config
;

UPDATE examples

Update template sync configuration parameters, except for the templateName and templateType. Repository details (branch, name, and provider) should be of a linked repository. A linked repository is a repository that has been registered with Proton. For more information, see CreateRepository.

UPDATE aws.proton.template_sync_configs
SET
branch = '{{ branch }}',
repositoryName = '{{ repositoryName }}',
repositoryProvider = '{{ repositoryProvider }}',
subdirectory = '{{ subdirectory }}',
templateName = '{{ templateName }}',
templateType = '{{ templateType }}'
WHERE
region = '{{ region }}' --required
AND branch = '{{ branch }}' --required
AND repositoryName = '{{ repositoryName }}' --required
AND repositoryProvider = '{{ repositoryProvider }}' --required
AND templateName = '{{ templateName }}' --required
AND templateType = '{{ templateType }}' --required
RETURNING
template_sync_config;

DELETE examples

Delete a template sync configuration.

DELETE FROM aws.proton.template_sync_configs
WHERE region = '{{ region }}' --required
;