This is an internal tool used by Vibe team to manage secrets stored in AWS SSM using Terraform.
go install github.com/vibeus/ssm-sync@v1.0.4Make sure ssm-sync is in your $PATH. Commands below should be run
in the ssm folders of Terraform configuration.
This is useful if you want to keep your local .tfvars file up to date.
ssm-syncCurrent secrets stored in SSM will be stored in terraform.tfvars
file. Now you can update them and use Terraform to push them back to
SSM.
To add a new SSM value, edit the resource file (default main.tf) by
adding new aws_ssm_parameter resources. Do not edit variable file
(default variables.tf) or .tfvars file (default terraform.tfvars)
as they should be auto generated.
Then, run the command below.
ssm-syncYou should find new entries being added to .tfvars file with dummy initial values. Now update these values with real value and run the command below.
terraform applyTo update SSM values, edit the terraform.tfvars file and run:
terraform apply