Skip to content

Feature request: atmos terraform deploy $component --all #292

Closed

Description

Describe the Feature

Add a new --all flag which is mutually exclusive with the --stack flag (only one or the other can be specified). Alternatively, the implementation could could be something more generalized like a --match flag which takes a regular expression. Then --all could just be an alias for --match '.*'.

Alternative names for --all might be --all-stacks or --everywhere.

Expected Behavior

When --all is passed, every stack that has the component is defined, it is deployed.

Use Case

Make it faster and less error-prone to bring up coldstarts.

Describe Ideal Solution

A clear and concise description of what you want to happen. If you don't know, that's okay.

Alternatives Considered

Explain what alternative solutions or features you've considered.

Today, our workflows will have something like:

deploy:
    description: team roles
    steps:
      - command: terraform deploy datadog-configuration -s mgmt-gbl-artifacts
      - command: terraform deploy datadog-configuration -s mgmt-gbl-audit
      - command: terraform deploy datadog-configuration -s mgmt-gbl-auto
      - command: terraform deploy datadog-configuration -s mgmt-gbl-corp
      - command: terraform deploy datadog-configuration -s mgmt-gbl-dns
      - command: terraform deploy datadog-configuration -s mgmt-gbl-network
      - command: terraform deploy datadog-configuration -s mgmt-gbl-security
      - command: terraform deploy datadog-configuration -s platform-gbl-dev
      - command: terraform deploy datadog-configuration -s platform-gbl-prod
      - command: terraform deploy datadog-configuration -s platform-gbl-sandbox
      - command: terraform deploy datadog-configuration -s platform-gbl-staging

This is error-prone, as stacks can be accidentally omitted.

This could be reduced to the following, which would be less error prone:

deploy:
    description: team roles
    steps:
      - command: terraform deploy datadog-configuration  --all

Additional Context

Ideally, this could also support a --parallel=5 option to run 5 processes in parallel.

Add any other context or screenshots about the feature request here.

Activity

  1. milldr commented on Jan 6, 2023

    @milldr
    SponsorContributor

    How would we specify the region? Perhaps something like:

    --all-regions
    --all --region=gbl
    --all --region=use1

    deploy:
        description: datadog config in all accounts in gbl region
        steps:
          - command: terraform deploy datadog-configuration  --all --region=gbl
    
    deploy:
        description: compliance  in all regions in mgmt-artifacts
        steps:
          - command: terraform deploy compliance mgmt-artifacts --all-regions
    
    deploy:
        description: compliance in all regions in all accounts
        steps:
          - command: terraform deploy compliance --all --all-regions
    
  2. changed the title [-]Feature request: atmos terraform deploy $component --all[/-] [+]Feature request: `atmos terraform deploy $component --all`[/+] on Feb 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions