Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat: Add flag to enable managed variables #97

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

Merged
merged 2 commits into from
Feb 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
4 changes: 4 additions & 0 deletions examples/resources/coder_parameter/resource.tf
Original file line number Diff line number Diff line change
@@ -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."
Expand Down
5 changes: 5 additions & 0 deletions provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down