authress

package
v1.0.33 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 31, 2023 License: Apache-2.0 Imports: 20 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetErrorWrapper

func GetErrorWrapper(errorString string) string

func MapTerraformRoleToSdk

func MapTerraformRoleToSdk(terraformRole *AuthressRoleResource) AuthressSdk.Role

func New

func New() provider.Provider

New is a helper function to simplify provider server and testing implementation.

func NewRoleResource

func NewRoleResource() resource.Resource

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

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

Configure adds the provider configured client to the data source.

func (*RoleInterfaceProvider) Create

Create creates the resource and sets the initial Terraform state.

func (*RoleInterfaceProvider) Delete

Delete deletes the resource and removes the Terraform state on success.

func (*RoleInterfaceProvider) ImportState

func (*RoleInterfaceProvider) Metadata

Metadata returns the data source type name.

func (*RoleInterfaceProvider) Read

Read refreshes the Terraform state with the latest data.

func (*RoleInterfaceProvider) Schema

Schema defines the schema for the data source.

func (*RoleInterfaceProvider) Update

Update updates the resource and sets the updated Terraform state on success.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL