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

Proposal: Implement terrahub migrate command #824

Open
eistrati opened this issue Jul 17, 2019 · 0 comments
Open

Proposal: Implement terrahub migrate command #824

eistrati opened this issue Jul 17, 2019 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@eistrati
Copy link
Contributor

Describe the Proposal

Implement terrahub migrate command as a five phases process that should be executed sequentially:

  1. START - start migration process for specific terrahub components using migrate workspace
  2. PUSH - push current configuration by swapping between current workspace and migrate workspace for ALL .tfstate files and ONLY migration related .tfvars files
  3. REVERT - revert previously executed terrahub push
  4. VALIDATE - validate that current workspace is successfully migrated away from migrate workspace
  5. CLEANUP - cleanup and remove everything related to migrate workspace

Expected Behavior

Without any changes to terraform configurations and/or terrahub components, we would like to be able to migrate resources that otherwise require downtime. For example: VPC and Subnets associated with Lambda function is NOT possible to modify unless Lambda is destroyed, then Subnet and last VPC is destroyed, after which we go back to build new VPC, then new Subnets, then new Lambda function. This process will require some kind of downtime.

On the other hand, without making any terraform changes, by executing terrahub migrate command we effectively duplicate resources for VPC and Subnets, build new Lambda function and swap between new .tfstate files and new .tfvars files for migrated resources, while using new .tfstate files with old .tfvars files for resources NOT in scope for migration.

It is NOT clear yet how other resources will behave, but overall goal of this new terrahub migrate command is to enhance some kind of lower to no downtime without any code changes.

@eistrati eistrati added the enhancement New feature or request label Jul 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants