Terraform
The tf-migrate stacks execute command directs Terraform to run the init, plan, and apply commands on the configuration generated with the tf-migrate stacks prepare command and migrate your HCP Terraform workspace and state to a Stack.
Usage
$ tf-migrate stacks execute
Description
The tf-migrate stacks execute command creates the project and Stack in HCP Terraform and migrates the existing state.
When tf-migrate completes the migration, it displays a link to the Stack it created and the project it created it in.
Example
The tf-migrate execute command automatically performs the migration and code updates.
$ tf-migrate stacks execute
✓ Stack configuration path found: /tmp/random_mod/_stacks_generated
✓ Successfully validated stack configuration found in dir: /tmp/random_mod/_stacks_generated
✓ Init command ran successfully
✓ Plan command ran successfully and changes are detected
✓ Apply command ran successfully in 35.049518291s
Apply complete! Resources: 3 added, 0 changed, 0 destroyed.
Migration Summary
┌─────────┬─────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Item │ URL │
├─────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Project │ https://app.terraform.io/app/<ORG>/projects/prj-zcHA23BCD4EFGHij │
│ Stack │ https://app.terraform.io/app/<ORG>/projects/prj-zcHA23BCD4EFGHij/stacks/st-ab1CDefGHijKlmNo │
└─────────┴─────────────────────────────────────────────────────────────────────────────────────────────────────────┘