Skip to content

Commit

Permalink
Merge pull request #82 from Infisical/misc/updated-conditions-v2-doc
Browse files Browse the repository at this point in the history
misc: added doc reference for permissions_v2 conditions usgae
  • Loading branch information
maidul98 authored Dec 13, 2024
2 parents dfaba5b + db77bef commit 0b53417
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/resources/project_identity_specific_privilege.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,5 +124,5 @@ Required:

Optional:

- `conditions` (String) When specified, only matching conditions will be allowed to access given resource.
- `conditions` (String) When specified, only matching conditions will be allowed to access given resource. Refer to the documentation in https://infisical.com/docs/internals/permissions#conditions for the complete list of supported properties and operators.
- `inverted` (Boolean) Whether rule forbids. Set this to true if permission forbids.
5 changes: 4 additions & 1 deletion docs/resources/project_role.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ resource "infisical_project_role" "biller" {
"$in" = ["dev", "prod"]
"$eq" = "dev"
}
secretPath = {
"$eq" = "/"
}
})
},
]
Expand Down Expand Up @@ -108,5 +111,5 @@ Required:

Optional:

- `conditions` (String) When specified, only matching conditions will be allowed to access given resource.
- `conditions` (String) When specified, only matching conditions will be allowed to access given resource. Refer to the documentation in https://infisical.com/docs/internals/permissions#conditions for the complete list of supported properties and operators.
- `inverted` (Boolean) Whether rule forbids. Set this to true if permission forbids.
3 changes: 3 additions & 0 deletions examples/resources/infisical_project_role/resource.tf
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ resource "infisical_project_role" "biller" {
"$in" = ["dev", "prod"]
"$eq" = "dev"
}
secretPath = {
"$eq" = "/"
}
})
},
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ func (r *projectIdentitySpecificPrivilegeResourceResource) Schema(_ context.Cont
},
"conditions": schema.StringAttribute{
Optional: true,
Description: "When specified, only matching conditions will be allowed to access given resource.",
Description: "When specified, only matching conditions will be allowed to access given resource. Refer to the documentation in https://infisical.com/docs/internals/permissions#conditions for the complete list of supported properties and operators.",
PlanModifiers: []planmodifier.String{
pkg.JsonEquivalentModifier{},
},
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/resource/project_role_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ func (r *projectRoleResource) Schema(_ context.Context, _ resource.SchemaRequest
},
"conditions": schema.StringAttribute{
Optional: true,
Description: "When specified, only matching conditions will be allowed to access given resource.",
Description: "When specified, only matching conditions will be allowed to access given resource. Refer to the documentation in https://infisical.com/docs/internals/permissions#conditions for the complete list of supported properties and operators.",
PlanModifiers: []planmodifier.String{
pkg.JsonEquivalentModifier{},
},
Expand Down

0 comments on commit 0b53417

Please sign in to comment.