template_sync_configs
Creates, updates, deletes, gets or lists a template_sync_configs resource.
Overview
| Name | template_sync_configs |
| Type | Resource |
| Id | aws.proton.template_sync_configs |
Fields
The following fields are returned by SELECT queries:
- get_template_sync_config
| Name | Datatype | Description |
|---|---|---|
branch | string | The repository branch. |
repository_name | string | The repository name (for example, myrepos/myrepo). (pattern: <code>[A-Za-z0-9_.-]./[A-Za-z0-9_.-].</code>) |
repository_provider | string | The repository provider. (GITHUB, GITHUB_ENTERPRISE, BITBUCKET) |
subdirectory | string | A subdirectory path to your template bundle version. |
template_name | string | The template name. (pattern: <code>^[0-9A-Za-z]+[0-9A-Za-z_-]*$</code>) |
template_type | string | The template type. (ENVIRONMENT, SERVICE) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_template_sync_config | select | region | Get detail data for a template sync configuration. | |
create_template_sync_config | insert | region, branch, repositoryName, repositoryProvider, templateName, templateType | 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. | |
update_template_sync_config | update | region, branch, repositoryName, repositoryProvider, templateName, templateType | 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. | |
delete_template_sync_config | delete | region | Delete 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_template_sync_config
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
- create_template_sync_config
- Manifest
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
;
# Description fields are for documentation purposes
- name: template_sync_configs
props:
- name: region
value: "{{ region }}"
description: Required parameter for the template_sync_configs resource.
- name: branch
value: "{{ branch }}"
description: |
The repository branch for your template.
- name: repositoryName
value: "{{ repositoryName }}"
description: |
The repository name (for example, myrepos/myrepo).
- name: repositoryProvider
value: "{{ repositoryProvider }}"
description: |
The provider type for your repository.
valid_values: ['GITHUB', 'GITHUB_ENTERPRISE', 'BITBUCKET']
- name: subdirectory
value: "{{ subdirectory }}"
description: |
A repository subdirectory path to your template bundle directory. When included, Proton limits the template bundle search to this repository directory.
- name: templateName
value: "{{ templateName }}"
description: |
The name of your registered template.
- name: templateType
value: "{{ templateType }}"
description: |
The type of the registered template.
valid_values: ['ENVIRONMENT', 'SERVICE']
UPDATE examples
- update_template_sync_config
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_template_sync_config
Delete a template sync configuration.
DELETE FROM aws.proton.template_sync_configs
WHERE region = '{{ region }}' --required
;