Skip to content

Coder Secret Requirement #796

@evgeniy-scherbina

Description

@evgeniy-scherbina

Depends on #795

Changes to terraform-provider-coder:

Define new coder_secret data source.

data "coder_secret" "my_secret" {
	env = "MY_SECRET"
}

data "coder_secret" "my_secret" {
	file = "~/.my-file"
}

# secrets should be accessible in build-time:
coder_secret.my_secret.value

Schema should consist of 3 fields:

  • env (optional)
  • file (optional)
  • value (readonly, sensitive)

Despite both env and file are optional, exactly one of them should be set.

Values should be populated from Environment Variables set by Build-time Secrets Injection process (see #795).

External auth data source is a good example how it can be implemented: https://github.com/coder/terraform-provider-coder/blob/main/provider/externalauth.go

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions