Documentation ¶
Index ¶
- func GetErrorWrapper(errorString string) string
- func MapTerraformRoleToSdk(terraformRole *AuthressRoleResource) AuthressSdk.Role
- func New() provider.Provider
- func NewRoleResource() resource.Resource
- type AuthressRolePermissionResource
- type AuthressRoleResource
- type BoolDefaultModifier
- type BuildInfo
- type RoleInterfaceProvider
- func (r *RoleInterfaceProvider) Configure(_ context.Context, req resource.ConfigureRequest, ...)
- func (r *RoleInterfaceProvider) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (r *RoleInterfaceProvider) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
- func (r *RoleInterfaceProvider) ImportState(ctx context.Context, req resource.ImportStateRequest, ...)
- func (r *RoleInterfaceProvider) Metadata(_ context.Context, req resource.MetadataRequest, ...)
- func (r *RoleInterfaceProvider) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r *RoleInterfaceProvider) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse)
- func (r *RoleInterfaceProvider) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetErrorWrapper ¶
func MapTerraformRoleToSdk ¶
func MapTerraformRoleToSdk(terraformRole *AuthressRoleResource) AuthressSdk.Role
func NewRoleResource ¶
NewRoleResource is a helper function to simplify the provider implementation.
Types ¶
type AuthressRolePermissionResource ¶
type AuthressRolePermissionResource struct { Allow TerraformType.Bool `tfsdk:"allow"` Grant TerraformType.Bool `tfsdk:"grant"` Delegate TerraformType.Bool `tfsdk:"delegate"` }
type AuthressRoleResource ¶
type AuthressRoleResource struct { // Remove after https://developer.hashicorp.com/terraform/plugin/framework/acctests#implement-id-attribute https://github.com/hashicorp/terraform-plugin-sdk/issues/1072 LegacyID TerraformType.String `tfsdk:"id"` RoleID TerraformType.String `tfsdk:"role_id"` Name TerraformType.String `tfsdk:"name"` Description TerraformType.String `tfsdk:"description"` LastUpdated TerraformType.String `tfsdk:"last_updated"` Permissions map[string]AuthressRolePermissionResource `tfsdk:"permissions"` }
*****************************************
Data stored in Terraform State and Plan
*****************************************
func MapSdkRoleToTerraform ¶
func MapSdkRoleToTerraform(authressSdkRole *AuthressSdk.Role) AuthressRoleResource
type BoolDefaultModifier ¶
type BoolDefaultModifier struct {
Default bool
}
stringDefaultModifier is a plan modifier that sets a default value for a types.boolType attribute when it is not configured. The attribute must be marked as Optional and Computed. When setting the state during the resource Create, Read, or Update methods, this default value must also be included or the Terraform CLI will generate an error.
func (BoolDefaultModifier) Description ¶
func (m BoolDefaultModifier) Description(ctx context.Context) string
Description returns a plain text description of the validator's behavior, suitable for a practitioner to understand its impact.
func (BoolDefaultModifier) MarkdownDescription ¶
func (m BoolDefaultModifier) MarkdownDescription(ctx context.Context) string
MarkdownDescription returns a markdown formatted description of the validator's behavior, suitable for a practitioner to understand its impact.
func (BoolDefaultModifier) PlanModifyBool ¶
func (m BoolDefaultModifier) PlanModifyBool(ctx context.Context, req planmodifier.BoolRequest, resp *planmodifier.BoolResponse)
PlanModifybool runs the logic of the plan modifier. Access to the configuration, plan, and state is available in `req`, while `resp` contains fields for updating the planned value, triggering resource replacement, and returning diagnostics.
type BuildInfo ¶
type BuildInfo struct {
Version string
}
func GetBuildInfo ¶
func GetBuildInfo() BuildInfo
type RoleInterfaceProvider ¶
type RoleInterfaceProvider struct {
// contains filtered or unexported fields
}
RoleInterfaceProvider is the resource implementation.
func (*RoleInterfaceProvider) Configure ¶
func (r *RoleInterfaceProvider) Configure(_ context.Context, req resource.ConfigureRequest, _ *resource.ConfigureResponse)
Configure adds the provider configured client to the data source.
func (*RoleInterfaceProvider) Create ¶
func (r *RoleInterfaceProvider) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
Create creates the resource and sets the initial Terraform state.
func (*RoleInterfaceProvider) Delete ¶
func (r *RoleInterfaceProvider) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
Delete deletes the resource and removes the Terraform state on success.
func (*RoleInterfaceProvider) ImportState ¶
func (r *RoleInterfaceProvider) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse)
func (*RoleInterfaceProvider) Metadata ¶
func (r *RoleInterfaceProvider) Metadata(_ context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse)
Metadata returns the data source type name.
func (*RoleInterfaceProvider) Read ¶
func (r *RoleInterfaceProvider) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
Read refreshes the Terraform state with the latest data.
func (*RoleInterfaceProvider) Schema ¶
func (r *RoleInterfaceProvider) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse)
Schema defines the schema for the data source.
func (*RoleInterfaceProvider) Update ¶
func (r *RoleInterfaceProvider) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
Update updates the resource and sets the updated Terraform state on success.