Skip to content

Commit

Permalink
Add Waypoint entitlements for organizations
Browse files Browse the repository at this point in the history
These changes add to the organizational entitlement struct to be able to
utilize the new Waypoint-based entitlements granted with HCP Terraform
feature sets:

- waypoint-actions
- waypoint-templates-and-addons
  • Loading branch information
ignatius-j committed Sep 30, 2024
1 parent 0b3525a commit bc01550
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
28 changes: 15 additions & 13 deletions organization.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,19 +157,21 @@ type Capacity struct {

// Entitlements represents the entitlements of an organization.
type Entitlements struct {
ID string `jsonapi:"primary,entitlement-sets"`
Agents bool `jsonapi:"attr,agents"`
AuditLogging bool `jsonapi:"attr,audit-logging"`
CostEstimation bool `jsonapi:"attr,cost-estimation"`
GlobalRunTasks bool `jsonapi:"attr,global-run-tasks"`
Operations bool `jsonapi:"attr,operations"`
PrivateModuleRegistry bool `jsonapi:"attr,private-module-registry"`
RunTasks bool `jsonapi:"attr,run-tasks"`
SSO bool `jsonapi:"attr,sso"`
Sentinel bool `jsonapi:"attr,sentinel"`
StateStorage bool `jsonapi:"attr,state-storage"`
Teams bool `jsonapi:"attr,teams"`
VCSIntegrations bool `jsonapi:"attr,vcs-integrations"`
ID string `jsonapi:"primary,entitlement-sets"`
Agents bool `jsonapi:"attr,agents"`
AuditLogging bool `jsonapi:"attr,audit-logging"`
CostEstimation bool `jsonapi:"attr,cost-estimation"`
GlobalRunTasks bool `jsonapi:"attr,global-run-tasks"`
Operations bool `jsonapi:"attr,operations"`
PrivateModuleRegistry bool `jsonapi:"attr,private-module-registry"`
RunTasks bool `jsonapi:"attr,run-tasks"`
SSO bool `jsonapi:"attr,sso"`
Sentinel bool `jsonapi:"attr,sentinel"`
StateStorage bool `jsonapi:"attr,state-storage"`
Teams bool `jsonapi:"attr,teams"`
VCSIntegrations bool `jsonapi:"attr,vcs-integrations"`
WaypointActions bool `jsonapi:"attr,waypoint-actions"`
WaypointTemplatesAndAddons bool `jsonapi:"attr,waypoint-templates-and-addons"`
}

// RunQueue represents the current run queue of an organization.
Expand Down
2 changes: 2 additions & 0 deletions organization_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,8 @@ func TestOrganizationsReadEntitlements(t *testing.T) {
assert.True(t, entitlements.StateStorage)
assert.True(t, entitlements.Teams)
assert.True(t, entitlements.VCSIntegrations)
assert.True(t, entitlements.WaypointActions)
assert.True(t, entitlements.WaypointTemplatesAndAddons)
})

t.Run("with invalid name", func(t *testing.T) {
Expand Down

0 comments on commit bc01550

Please sign in to comment.