Documentation ¶
Index ¶
- Variables
- func NewPagePermissionsResource() resource.Resource
- func PagePermissionsSchema() map[string]schema.Attribute
- type PagePermissionsModel
- type PagePermissionsResource
- func (r *PagePermissionsResource) Configure(ctx context.Context, req resource.ConfigureRequest, ...)
- func (r *PagePermissionsResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (r *PagePermissionsResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
- func (r *PagePermissionsResource) ImportState(ctx context.Context, req resource.ImportStateRequest, ...)
- func (r *PagePermissionsResource) Metadata(ctx context.Context, req resource.MetadataRequest, ...)
- func (r *PagePermissionsResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r *PagePermissionsResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
- func (r *PagePermissionsResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
- type ReadPagePermissionsModel
Constants ¶
This section is empty.
Variables ¶
View Source
var PagePermissionsResourceMarkdownDescription = `
# Page Permissions resource
Docs about page permissions can be found [here](https://docs.getport.io/customize-pages-dashboards-and-plugins/page/page-permissions?view-permissions=api).
## Example Usage
### Allow read access to all members:
` + "```hcl" + `
resource "port_page_permissions" "microservices_permissions" {
page_identifier = "microservices"
read = {
"roles": ["Member"],
"users": [],
"teams": [],
}
}` + "\n```" + `
### Allow read access to all admins and a specific user and team:
` + "```hcl" + `
resource "port_page_permissions" "microservices_permissions" {
page_identifier = "microservices"
read = {
"roles": [
"Admin",
],
"users": ["test-admin-user@test.com"],
"teams": ["Team Spiderman"],
}
}` + "\n```" + `
### Allow read access to specific users and teams:
` + "```hcl" + `
resource "port_page_permissions" "microservices_permissions" {
page_identifier = "microservices"
read = {
"roles": [],
"users": ["test-admin-user@test.com"],
"teams": ["Team Spiderman"],
}
}` + "\n```" + `
## Disclaimer
- Page permissions are created by default when page is first created, this means that you should use this resource when you want to change the default permissions of a page.
- When deleting a page permissions resource using terraform, the page permissions will not be deleted from Port, as they are required for the action to work, instead, the page permissions will be removed from the terraform state.
`
Functions ¶
func PagePermissionsSchema ¶
Types ¶
type PagePermissionsModel ¶
type PagePermissionsModel struct { ID types.String `tfsdk:"id"` PageIdentifier types.String `tfsdk:"page_identifier"` Read *ReadPagePermissionsModel `tfsdk:"read"` }
type PagePermissionsResource ¶
type PagePermissionsResource struct {
// contains filtered or unexported fields
}
func (*PagePermissionsResource) Configure ¶
func (r *PagePermissionsResource) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse)
func (*PagePermissionsResource) Create ¶
func (r *PagePermissionsResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
func (*PagePermissionsResource) Delete ¶
func (r *PagePermissionsResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
func (*PagePermissionsResource) ImportState ¶
func (r *PagePermissionsResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse)
func (*PagePermissionsResource) Metadata ¶
func (r *PagePermissionsResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse)
func (*PagePermissionsResource) Read ¶
func (r *PagePermissionsResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
func (*PagePermissionsResource) Schema ¶
func (r *PagePermissionsResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
func (*PagePermissionsResource) Update ¶
func (r *PagePermissionsResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
Click to show internal directories.
Click to hide internal directories.