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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable workspace and organization Health Assessment (drift detection) setting management #462
Merged
Merged
Changes from 9 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
49e6981
Enable workspace drift detection setting management
rexredinger 9356bf5
Apply suggestions from code review
rexredinger 608378c
ABC ordering and more explicit commenting
rexredinger a5b4ebc
changelog update
rexredinger c5ceb74
Update to use AssessmentsEnabled over DriftDetection
rexredinger 713416e
Add support for Organization AssessmentsEnforced setting
rexredinger 12df3b2
Changelog update
rexredinger ecac4e5
Explain 'assessable' and fix typoes
rexredinger 86befda
Fix test
rexredinger 295d05a
Order attributes
rexredinger 0c6a997
omitempty
rexredinger File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -115,6 +115,7 @@ type Workspace struct { | |
CanQueueDestroyPlan bool `jsonapi:"attr,can-queue-destroy-plan"` | ||
CreatedAt time.Time `jsonapi:"attr,created-at,iso8601"` | ||
Description string `jsonapi:"attr,description"` | ||
AssessmentsEnabled bool `jsonapi:"attr,assessments-enabled"` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 馃拝 Could you add this attribute in alphabetical order? |
||
Environment string `jsonapi:"attr,environment"` | ||
ExecutionMode string `jsonapi:"attr,execution-mode"` | ||
FileTriggersEnabled bool `jsonapi:"attr,file-triggers-enabled"` | ||
|
@@ -270,6 +271,11 @@ type WorkspaceCreateOptions struct { | |
// Optional: A description for the workspace. | ||
Description *string `jsonapi:"attr,description,omitempty"` | ||
|
||
// Optional: Whether to enable health assessments (drift detection etc.) for the workspace. | ||
// Reference: https://www.terraform.io/cloud-docs/api-docs/workspaces#create-a-workspace | ||
// Requires remote execution mode, Terraform Cloud Business entitlement, and a valid agent pool to work | ||
AssessmentsEnabled *bool `jsonapi:"attr,assessments-enabled,omitempty"` | ||
|
||
// Optional: Which execution mode to use. Valid values are remote, local, and agent. | ||
// When set to local, the workspace will be used for state storage only. | ||
// This value must not be specified if operations is specified. | ||
|
@@ -389,6 +395,11 @@ type WorkspaceUpdateOptions struct { | |
// Optional: A description for the workspace. | ||
Description *string `jsonapi:"attr,description,omitempty"` | ||
|
||
// Optional: Whether to enable health assessments (drift detection etc.) for the workspace. | ||
// Reference: https://www.terraform.io/cloud-docs/api-docs/workspaces#update-a-workspace | ||
// Requires remote execution mode, Terraform Cloud Business entitlement, and a valid agent pool to work | ||
AssessmentsEnabled *bool `jsonapi:"attr,assessments-enabled,omitempty"` | ||
|
||
// Optional: Which execution mode to use. Valid values are remote, local, and agent. | ||
// When set to local, the workspace will be used for state storage only. | ||
// This value must not be specified if operations is specified. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
馃拝 Could you add this attribute in alphabetical order?