A simple demo of mozilla/sops and usage within Terraform. This is for a quick talk I'm giving at the DevOps Boulder Meetup on 4/19/21.
See the slide deck here for more information.
You can't unfortunately ๐.
The whole point to utilizing sops for the "secret" values that we are storing in secrets.yaml is that you would need to have access to my AWS Account's KMS key to be able to decrypt those secrets. So if you try to run a terraform plan as part of this project, the sops provider (terraform-provider-sops) will fail because it can't decrypt those secret values.
If you would like to try, then you're more than welcome! You'll need to do the following:
- Remove the
secrets.yamlfile from your local working directory - Utilize
sopsto create a new one using your own AWS KMS key or PGP key:sops --kms arn:aws:kms:<REGION>:<ACCOUNT_ID>:key/<KMS_KEY_ID> secrets.yaml
- Run
terraform plan.
If you have AWS credentials (AWS_ACCESS_KEY_ID + AWS_SECRET_ACESS_KEY) properly exported to your shell's environment then it will work!