diff --git a/docs/index.md b/docs/index.md index 859964d4..154423c1 100644 --- a/docs/index.md +++ b/docs/index.md @@ -62,4 +62,5 @@ resource "google_compute_instance" "dev" { ### Optional +- `feature_use_managed_variables` (Boolean) Feature: use managed Terraform variables. If disabled, Terraform variables will be included in legacy Parameter Schema. - `url` (String) The URL to access Coder. \ No newline at end of file diff --git a/examples/resources/coder_parameter/resource.tf b/examples/resources/coder_parameter/resource.tf index ea2a3e47..c4d7e859 100644 --- a/examples/resources/coder_parameter/resource.tf +++ b/examples/resources/coder_parameter/resource.tf @@ -1,3 +1,7 @@ +provider "coder" { + feature_use_managed_variables = true +} + data "coder_parameter" "example" { name = "Region" description = "Specify a region to place your workspace." diff --git a/provider/provider.go b/provider/provider.go index 2032cec3..147b0187 100644 --- a/provider/provider.go +++ b/provider/provider.go @@ -35,6 +35,11 @@ func New() *schema.Provider { return nil, nil }, }, + "feature_use_managed_variables": { + Type: schema.TypeBool, + Description: "Feature: use managed Terraform variables. If disabled, Terraform variables will be included in legacy Parameter Schema.", + Optional: true, + }, }, ConfigureContextFunc: func(c context.Context, resourceData *schema.ResourceData) (interface{}, diag.Diagnostics) { rawURL, ok := resourceData.Get("url").(string)