Deploy targets
Deploy infrastructure configured with config sets to the specified deployment groups and targets.

Usage

1
tkm targets deploy [group-path...] \
2
[--target <target>]... \
3
[--exclude-target <target>]... \
4
[--label <label>]... \
5
[--exclude-label <label>]... \
6
[--concurrent-targets <count>] \
7
[--config-set <config-set>] \
8
[--command-path <command-path>] \
9
[--expect-no-changes]
Copied!

Positional arguments

    group-path
      Provide one or more deployment group paths to deploy only the targets that belong to the deployment groups located under the given deployment group paths in the deployment groups hierarchy.
      Optional.

Options

In addition to the common options, this command has the following options.
    --label <label>
      Choose deployment targets by label. You can use this option multiple times to specify more labels.
      Optional
    --exclude-label <label>
      Exclude deployment targets by label. You can use this option multiple times to specify more labels.
      Optional
    --target <target>
      Deployment targets to deploy. You can use this option multiple times to specify more targets. You can use % character as a wildcard at the beginning and/or end of the target name to more than one target.
      Optional
    --exclude-target <target>
      Exclude deployment targets. You can use this option multiple times to specify more targets. You can use % character as a wildcard at the beginning and/or end of the target name to more than one target.
      Optional
    --concurrent-targets <number>
      Number of deployment targets to deploy concurrently. Defaults to 1. If you choose to review changes to each target, this is set to 1.
      Optional
    --config-set <config-set>
      Deploy only this config set.
      Optional
    --command-path <command-path>
      Deploy only stacks under this command path.
      To use this option, also the --config-set option must be given.
    --expect-no-changes
      Fail the deployment if at least one stack has changes.

IAM permissions

These are the minimum IAM permissions required to run this command.
1
# Minimum permissions. Additional permissions are needed to actually
2
# modify resources defined in the CloudFormation templates.
3
Statement:
4
- Sid: CloudFormation
5
Effect: Allow
6
Action:
7
- cloudformation:CancelUpdateStack
8
- cloudformation:DescribeStackEvents
9
- cloudformation:CreateStack
10
- cloudformation:GetTemplate
11
- cloudformation:DeleteStack
12
- cloudformation:UpdateStack
13
- cloudformation:CreateChangeSet
14
- cloudformation:DescribeChangeSet
15
- cloudformation:DeleteChangeSet
16
- cloudformation:ValidateTemplate
17
- cloudformation:DescribeStacks
18
- cloudformation:GetTemplateSummary
19
- cloudformation:UpdateTerminationProtection
20
Resource: "*"
21
22
# S3 permissions needed only if a template bucket is used.
23
# Specify resource to restrict access to specific buckets.
24
- Sid: S3
25
Effect: Allow
26
Action:
27
- s3:PutObject
28
Resource: "*"
29
30
# IAM permissions needed only if command roles are used
31
# Specify resource to restrict access to specific roles.
32
- Sid: IAM
33
Effect: Allow
34
Action:
35
- sts:AssumeRole
36
Resource: "*"
Copied!

Examples

Deploy all deployment targets
1
tkm targets deploy
Copied!
Deploy only targets that belong to a deployment group MyGroup or to any other deployment group under it
1
tkm targets deploy MyGroup
Copied!
Deploy only the deployment target named my-target
1
tkm targets deploy --target my-target
Copied!
Deploy all deployment targets whose name ends with -test
1
tkm targets deploy --target %-test
Copied!
Deploy all targets that have label test or dev
1
tkm targets deploy --label test --label dev
Copied!
Last modified 1mo ago