Skip to content

Commit c9ba155

Browse files
feat: add abac rules for products, environments, and promotion flows
1 parent 3fe2bc4 commit c9ba155

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

codefresh/resource_abac_rules.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
1212
)
1313

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

1616
func resourceGitopsAbacRule() *schema.Resource {
1717
return &schema.Resource{
@@ -34,11 +34,14 @@ func resourceGitopsAbacRule() *schema.Resource {
3434
Description: `
3535
The type of resources the ABAC rules applies to. Possible values:
3636
* gitopsApplications
37+
* promotionFlows
38+
* products
39+
* environments
3740
`,
3841
Type: schema.TypeString,
3942
Required: true,
4043
ValidateFunc: validation.StringInSlice([]string{
41-
"gitopsApplications",
44+
"gitopsApplications, promotionFlows, products, environments",
4245
}, false),
4346
},
4447
"teams": {
@@ -67,6 +70,9 @@ Action to be allowed. Possible values:
6770
* TERMINATE_SYNC
6871
* VIEW_POD_LOGS
6972
* APP_ROLLBACK
73+
* "TRIGGER_PROMOTION"
74+
* "RETRY_RELEASE"
75+
* "PROMOTE_TO"
7076
`,
7177
Type: schema.TypeSet,
7278
Required: true,

0 commit comments

Comments
 (0)