Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENG-8693: Add value_type support to the Terraform provider #118

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

christopher-bulger
Copy link

@christopher-bulger christopher-bulger commented Jan 14, 2025

Closes ENG-8693

This PR adds support to specify value_type when creating a secret with Terraform.

resource "doppler_secret" "db_password" {
  project = doppler_project.backend.name
  config = doppler_config.backend_stg.name
  name = "DB_PASSWORD"
  value = "1"
  value_type = "integer"
}

@@ -75,11 +84,13 @@ func resourceSecretUpdate(ctx context.Context, d *schema.ResourceData, m interfa
name := d.Get("name").(string)
value := d.Get("value").(string)
visibility := d.Get("visibility").(string)
valueType := d.Get("value_type").(string)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In addition to adding this field to the resourceSecretUpdate func, we need to add it to resourceSecretRead to detect out-of-band changes to the secret value type. Unfortunately, the GET /v3/configs/config/secret endpoint that we use today doesn't have this data available. We can discuss in ENG-8693 how to go about adding it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants