Skip to content

Commit

Permalink
feat: add abac rules for products, environments, and promotion flows
Browse files Browse the repository at this point in the history
  • Loading branch information
danielm-codefresh committed Aug 31, 2024
1 parent 3fe2bc4 commit c9ba155
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions codefresh/resource_abac_rules.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
)

var validSetValues = []string{"REFRESH", "SYNC", "TERMINATE_SYNC", "VIEW_POD_LOGS", "APP_ROLLBACK"}
var validSetValues = []string{"REFRESH", "SYNC", "TERMINATE_SYNC", "VIEW_POD_LOGS", "APP_ROLLBACK", "TRIGGER_PROMOTION", "RETRY_RELEASE", "PROMOTE_TO"}

func resourceGitopsAbacRule() *schema.Resource {
return &schema.Resource{
Expand All @@ -34,11 +34,14 @@ func resourceGitopsAbacRule() *schema.Resource {
Description: `
The type of resources the ABAC rules applies to. Possible values:
* gitopsApplications
* promotionFlows
* products
* environments
`,
Type: schema.TypeString,
Required: true,
ValidateFunc: validation.StringInSlice([]string{
"gitopsApplications",
"gitopsApplications, promotionFlows, products, environments",
}, false),
},
"teams": {
Expand Down Expand Up @@ -67,6 +70,9 @@ Action to be allowed. Possible values:
* TERMINATE_SYNC
* VIEW_POD_LOGS
* APP_ROLLBACK
* "TRIGGER_PROMOTION"
* "RETRY_RELEASE"
* "PROMOTE_TO"
`,
Type: schema.TypeSet,
Required: true,
Expand Down

0 comments on commit c9ba155

Please sign in to comment.