Closed b-per closed 7 months ago
Setting the value to ""
doesn't do anything either
The current resource uses an "older" API technique where we do a PUT
on https://emea.dbt.com/api/v3/accounts/<account>/projects/<project>/environment-variables/bulk/
with the body
{
"env_vars": {
"DEV": "2",
"PROD": "",
"name": "DBT_TF_ENV_VAR",
"project": "1"
}
}
If some keys are removed, or provided empty inputs, they are not removed in dbt Cloud.
Some options to fix it would be:
env_vars
we force the destroy and recreation of the resourceenv_var
+ scope (e.g. project or env name) rather than just env_var
, allowing to destroy specific env_var
+ scope resourcesOption 2 might actually help with allowing people to overwrite the env var on at the job level
Describe the bug
Removing an
environment_values
for an existingdbtcloud_environment_variable
resource doesn't remove it in dbt CloudError message
No error message, but the env variable is not removed
Expected behavior
The env var is removed