Skip to content
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

Workspace not updated when assessments_enabled is the only change #641

Merged
merged 3 commits into from
Oct 3, 2022
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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## Unreleased

BUG FIXES:

* r/tfe_workspace: When assessments_enabled was the only change in to the resource the workspace was not being updated ([#641](https://github.com/hashicorp/terraform-provider-tfe/pull/641))

## v0.37.0 (September 28, 2022)

FEATURES:
Expand Down
9 changes: 5 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ After creating new schema, it's important to test your changes beyond the automa
- Are mutually exclusive config arguments constrained by an error?
- If adding a new argument to an existing resource: is it required? (This would be a breaking change)
- If adding a new attribute to an existing resource: is new or unexpected API authorization required?
- Is the new resource argument updated when it is the _only_ change in a plan?

### Updating the Changelog

Expand Down Expand Up @@ -125,7 +126,7 @@ $ cd terraform-provider-tfe
$ go build -gcflags="all=-N -l" -o {where to place the binary}
```

example, replace {platform}.
example, replace {platform}.
```sh
go build -gcflags="all=-N -l" -o bin/registry.terraform.io/hashicorp/tfe/9.9.9/{platform}/terraform-provider-tfe
```
Expand All @@ -143,7 +144,7 @@ dlv exec \
-- -debug
```

example
example
```sh
dlv exec \
--accept-multiclient \
Expand Down Expand Up @@ -176,7 +177,7 @@ Example taken from [here](https://www.terraform.io/plugin/debugging#visual-studi

```

You'll know you activated the debugger successfully if you see the following output.
You'll know you activated the debugger successfully if you see the following output.

*For vscode, the output will be located in the Debug Console tab.*

Expand Down Expand Up @@ -224,4 +225,4 @@ If using the Delve CLI, include the full qualifed path to set a breakpoint.

```
(delve) b /Users/{user}/path/to/terraform-provider-tfe/tfe/resource_example.go:35
```
```
3 changes: 2 additions & 1 deletion tfe/resource_tfe_workspace.go
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,8 @@ func resourceTFEWorkspaceUpdate(d *schema.ResourceData, meta interface{}) error
d.HasChange("allow_destroy_plan") || d.HasChange("speculative_enabled") ||
d.HasChange("operations") || d.HasChange("execution_mode") ||
d.HasChange("description") || d.HasChange("agent_pool_id") ||
d.HasChange("global_remote_state") || d.HasChange("structured_run_output_enabled") {
d.HasChange("global_remote_state") || d.HasChange("structured_run_output_enabled") ||
d.HasChange("assessments_enabled") {
// Create a new options struct.
options := tfe.WorkspaceUpdateOptions{
Name: tfe.String(d.Get("name").(string)),
Expand Down