dbt-labs / terraform-provider-dbtcloud

dbt Cloud Terraform Provider
https://registry.terraform.io/providers/dbt-labs/dbtcloud
MIT License
80 stars 18 forks source link

Drift in dbtcloud_environment_variable when using sensitive variable DBT_ENV_SECRET_ #229

Closed yaeba closed 5 months ago

yaeba commented 6 months ago

Describe the bug

Using dbtcloud_environment_variable to manage sensitive variable ie DBT_ENV_SECRET_xxx will always result in drifts, as the API response contains masked value

Error message

na

Resource configuration

resource "dbtcloud_environment_variable" "test" {
  name       = "DBT_ENV_SECRET_TEST"
  project_id = 10
  environment_values = {
    "project" : "some-secret-here"
  }
}

will give the following during planning

Plan: 0 to add, 1 to change, 0 to destroy.

Expected behavior

Should not result in drift

Config (please complete the following information):

Additional context

Add any other context about the problem here.

b-per commented 5 months ago

Thanks for raising this! This is a scenario I didn't think about yet.

I will try to change the behaviour and do a new release in the next days.