Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add component attribute to stack configs. Allow configuring and provisioning many instances of the same component. #15

Merged
merged 8 commits into from
Jan 15, 2021

Conversation

aknysh
Copy link
Member

@aknysh aknysh commented Jan 15, 2021

what

  • Add component attribute to stack configs

why

  • Allow specifying YAML configs and provisioning many instances of the same component type.
    For example, we can specify the following config to provision many different instances of AWS Aurora clusters by referencing the common aurora-postgres component:
components:
  terraform:
    db1:
      component: aurora-postgres
      vars:
        instance_type: db.r4.large
        cluster_size: 1
    db2:
      component: aurora-postgres
      vars:
        instance_type: db.r4.large
        cluster_size: 1
    db3:
      component: aurora-postgres
      vars:
        instance_type: db.r1.large
        cluster_size: 1
    db4:
      component: aurora-postgres
      vars:
        instance_type: db.r8.large
        cluster_size: 1

and then use the following commands to plan/apply the database components:

atmos terraform plan db1 -s uw2-prod
atmos terraform apply db1 -s uw2-prod

atmos terraform plan db2 -s uw2-prod
atmos terraform apply db2 -s uw2-prod

atmos terraform plan db3 -s uw2-prod
atmos terraform apply db3 -s uw2-prod

@aknysh aknysh requested review from osterman and Nuru January 15, 2021 01:00
@aknysh aknysh self-assigned this Jan 15, 2021
@aknysh aknysh requested review from a team as code owners January 15, 2021 01:00
@aknysh aknysh requested a review from brcnblc January 15, 2021 01:00
@aknysh aknysh merged commit 9f4c51a into master Jan 15, 2021
@aknysh aknysh deleted the add-component branch January 15, 2021 01:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants