Skip to content

Commit 82d492d

Browse files
committed
Change to mutable
1 parent 12f02f7 commit 82d492d

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

provider/parameter.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ type Parameter struct {
3333
Name string
3434
Description string
3535
Type string
36-
Immutable bool
36+
Mutable bool
3737
Default string
3838
Icon string
3939
Option []Option
@@ -52,7 +52,7 @@ func parameterDataSource() *schema.Resource {
5252
Name interface{}
5353
Description interface{}
5454
Type interface{}
55-
Immutable interface{}
55+
Mutable interface{}
5656
Default interface{}
5757
Icon interface{}
5858
Option interface{}
@@ -62,7 +62,7 @@ func parameterDataSource() *schema.Resource {
6262
Name: rd.Get("name"),
6363
Description: rd.Get("description"),
6464
Type: rd.Get("type"),
65-
Immutable: rd.Get("immutable"),
65+
Mutable: rd.Get("mutable"),
6666
Default: rd.Get("default"),
6767
Icon: rd.Get("icon"),
6868
Option: rd.Get("option"),
@@ -139,10 +139,10 @@ func parameterDataSource() *schema.Resource {
139139
ValidateFunc: validation.StringInSlice([]string{"number", "string", "bool"}, false),
140140
Description: `The type of this parameter. Must be one of: "number", "string", or "bool".`,
141141
},
142-
"immutable": {
142+
"mutable": {
143143
Type: schema.TypeBool,
144144
Optional: true,
145-
Default: true,
145+
Default: false,
146146
Description: "Whether this value can be changed after workspace creation. This can be destructive for values like region, so use with caution!",
147147
},
148148
"default": {

provider/parameter_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ data "coder_parameter" "region" {
2525
name = "Region"
2626
type = "string"
2727
description = "Some option!"
28-
immutable = false
28+
mutable = true
2929
icon = "/icon/region.svg"
3030
option {
3131
name = "US Central"
@@ -47,7 +47,7 @@ data "coder_parameter" "region" {
4747
"name": "Region",
4848
"type": "string",
4949
"description": "Some option!",
50-
"immutable": "false",
50+
"mutable": "true",
5151
"icon": "/icon/region.svg",
5252
"option.0.name": "US Central",
5353
"option.0.value": "us-central1-a",

0 commit comments

Comments
 (0)