For every organization it will create a new workspace called "SMK" in the default project
The SMK workspace will, initially, be setup with a "remote" runner.
The SMK workspace will be setup as a cli driven workflow
Using a new docker image, terraform-push we will run a quick apply with a null resource.
This is because the migration kit dies if there is no state in the workspace.
We will then update the SMK workspace to use the SMK agent instead of "remote"
We will list every variable set in the organization
We will backup the variable sets current relationships
We will update the variable sets relationship to the SMK workspace only and set it to priority to ensure no auto attaching variables will overwrite the ones from this variable set.
We will trigger a plan on the SMK agent and capture the environment
We will loop through all the variables and see if any of them correspond with sensitive variables in the current variable set, if they do we set that value in data.json
We reset the variable sets relationships back to what they were in the backup taken previously.
Added support for variable sets in TFC
The way this works:
terraform-push
we will run a quick apply with a null resource.priority
to ensure no auto attaching variables will overwrite the ones from this variable set.data.json