Awesome
platform-infra
initialize
make tool
platform-manifest
initialize project
- generate key
make key
- set
public key
tokey
inscript/encrypt.sh
key=${public key}
- set secret key as name
SOPS_AGE_KEY
toSettings
>Secrets
inOcteto
create app
- create helm charts
helm create <app-name>
platform-terraform
Terraform Cloud Workspaces Initialize
- https://app.terraform.io/app
Create a workspace
- choose
API-driven workflow
- Workspace Name:
platform-$ENV
(prev
orprod
) Settings
>General
>Execution Mode
-> selectLocal
->Save settings
Setup Local PC
brew tap hashicorp/tap
brew install hashicorp/tap/terraform
brew install gettext
Update .terraform.lock.hcl
.secret.env
TF_TOKEN_app_terraform_io=*********
make tfinit
Initialize SOPS (Secrets)
- generate key
make tfkey
- set
public key
tokey
inscript/tfencrypt.sh
- set
private key
toSOPS_AGE_KEY
inSettings
>Secrets and variables
>Actions
>New repository secret
inGitHub
Add new secret
- execute
make tfsecret secret=${secret}
ex)make tfsecret secret=password
- set in the secret value in
terraform/sops/${secret}.in.txt
- execute
make tfencrypt secret=${secret}
ex)make tfencrypt secret=password
Change secret
- change
terraform/sops/${secret}.in.txt
- execute
make tfencrypt secret=${secret}
ex)make tfencrypt secret=password
Confirm secret value
- execute
make tfdecrypt secret=${secret}
ex)make tfdecrypt secret=password
- confirm
terraform/sops/${secret}.out.txt
Q&A
Q. What if you want to delete the resource for each provider?
A. If the provider is deleted, the resource cannot be deleted. Let's remove the resource first. and merge. Then remove the provider.