Skip to content

Commit f9ea3b6

Browse files
committed
fix rm ForceNew workspace source values
1 parent ef48a2c commit f9ea3b6

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

internal/provider/resource_tfe_workspace.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,14 +206,12 @@ func resourceTFEWorkspace() *schema.Resource {
206206
"source_name": {
207207
Type: schema.TypeString,
208208
Optional: true,
209-
ForceNew: true,
210209
RequiredWith: []string{"source_url"},
211210
},
212211

213212
"source_url": {
214213
Type: schema.TypeString,
215214
Optional: true,
216-
ForceNew: true,
217215
ValidateFunc: validation.IsURLWithHTTPorHTTPS,
218216
RequiredWith: []string{"source_name"},
219217
},

website/docs/r/workspace.html.markdown

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,13 @@ The following arguments are supported:
9696
* `remote_state_consumer_ids` - (Optional) **Deprecated** The set of workspace IDs set as explicit remote state consumers for the given workspace. Use [tfe_workspace_settings](workspace_settings) instead.
9797
* `source_name` - (Optional) A friendly name for the application or client
9898
creating this workspace. If set, this will be displayed on the workspace as
99-
"Created via <SOURCE NAME>".
100-
Requires `source_url` to also be set.
99+
"Created via <SOURCE NAME>". This value cannot be updated after
100+
initial creation. Use `terraform apply -replace` to update this value. Requires `source_url` to also be set.
101101
* `source_url` - (Optional) A URL for the application or client creating this
102102
workspace. This can be the URL of a related resource in another app, or a
103103
link to documentation or other info about the client.
104-
Requires `source_name` to also be set.
104+
Requires `source_name` to also be set. This value cannot be updated after
105+
initial creation. Use `terraform apply -replace` to update this value.
105106
**Note:** The API does not (currently) allow this to be updated after a
106107
workspace has been created, so modifying this value will result in the
107108
workspace being replaced. To disable this, use an [ignore changes](https://developer.hashicorp.com/terraform/language/meta-arguments/lifecycle#ignore_changes) lifecycle meta-argument

0 commit comments

Comments
 (0)