Usage:
  telophasecli deploy [flags]

Flags:
  -h, --help              help for deploy
      --org string        Path to the organization.yml file (default "organization.yml")
      --stacks string     Filter stacks to deploy
      --tag string        Filter accounts and account groups to deploy
      --tui               use the TUI for deploy

This command will read organization.yml and perform:

  1. Changes required to AWS Organization, provisioning/deprovisioning new accounts.
  2. Provision Resources within the accounts:
  • CDK deploy. Telophase runs cdk bootstrap and cdk synth on every deploy.
  • Terraform apply. Telophase automatically runs terraform plan if no plan exists.
  • telophasecli diff does NOT need to be run before telophasecli deploy.

Examples

For the following examples, we will use the following organization.yml.

organization.yml
Organization:
    Name: root
    OrganizationUnits:
      - Name: ProductionTenants
        Stacks:
          - Type: "CDK"
            Path: "./s3-remote-state"
          - Type: "Terraform"
            Path: "./tf/ci_iam"
            Name: "Default IAM Roles for CI"
        # Tags are specified here
        Tags:
          - "env=production"
        Accounts:
          - Email: production+us0@example.com
            AccountName: US0 
          - Email: production+us1@example.com
            AccountName: US1 
          - Email: production+us2@example.com
            AccountName: US2 
          - Email: production+us3@example.com
            AccountName: US3 

      - Name: Development 
        Stacks:
          - Type: "CDK"
            Path: "./s3-remote-state"
        Tags:
          - "dev"
        Accounts:
          - Email: alice@example.com
            AccountName: Alice
          - Email: bob@example.com 
            AccountName: Bob 
          - Email: ethan@example.com
            AccountName: Ethan 

Using Tags

Running telophasecli deploy --tag="env=production" will only deploy terraform and CDK changes for the accounts named US0, US1, US2, US3. The resulting TUI looks like: