- Create branch from main.
- Put tf files.
- Create pull-request to main
- Terraform Cloud run "terraform plan" (dry-run)
- Merge pull-request
- Terraform Cloud run "terraform apply" (deploy)
- Get "terraform.tfvars" and "terraform.tfstate" from Terraform Cloud and Put files
- Exec following command
docker run -it -v $PWD:/app -w /app hashicorp/terraform:0.12.24 init
docker run -it -v $PWD:/app -w /app hashicorp/terraform:0.12.24 plan \
-var "PRIVATE_KEY=$(cat oci.pem)" \
-var "SSH_PUBLIC_KEY=$(cat oci.pem.pub)"
docker run -it -v $PWD:/app -w /app hashicorp/terraform:0.12.24 apply \
-var "PRIVATE_KEY=$(cat oci.pem)" \
-var "SSH_PUBLIC_KEY=$(cat oci.pem.pub)"