integrations

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: MPL-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewIntegrationDataSource

func NewIntegrationDataSource() datasource.DataSource

NewIntegrationDataSource creates a new instance of IntegrationDataSource.

func NewIntegrationResource

func NewIntegrationResource() resource.Resource

Types

type IntegrationDataSource

type IntegrationDataSource struct {
	// contains filtered or unexported fields
}

IntegrationDataSource defines the data source implementation.

func (*IntegrationDataSource) Configure

Configure configures the data source with the provided client.

func (*IntegrationDataSource) Metadata

Metadata sets the metadata for the data source.

func (*IntegrationDataSource) Read

Read retrieves data from the provider and populates the data source model.

func (*IntegrationDataSource) Schema

Schema defines the data source schema.

type IntegrationDataSourceModel

type IntegrationDataSourceModel struct {
	Id                                   types.String             `tfsdk:"id"`
	Name                                 types.String             `tfsdk:"name"`
	AllowedDurations                     types.List               `tfsdk:"allowed_durations"`
	AllowChangingAccountPermissions      types.Bool               `tfsdk:"allow_changing_account_permissions"`
	AllowCreatingAccounts                types.Bool               `tfsdk:"allow_creating_accounts"`
	Readonly                             types.Bool               `tfsdk:"readonly"`
	AllowRequests                        types.Bool               `tfsdk:"allow_requests"`
	AllowRequestsByDefault               types.Bool               `tfsdk:"allow_requests_by_default"`
	AllowAsGrantMethod                   types.Bool               `tfsdk:"allow_as_grant_method"`
	AllowAsGrantMethodByDefault          types.Bool               `tfsdk:"allow_as_grant_method_by_default"`
	AutoAssignRecommendedMaintainers     types.Bool               `tfsdk:"auto_assign_recommended_maintainers"`
	AutoAssignRecommendedOwners          types.Bool               `tfsdk:"auto_assign_recommended_owners"`
	NotifyAboutExternalPermissionChanges types.Bool               `tfsdk:"notify_about_external_permission_changes"`
	Owner                                *utils.IdEmailModel      `tfsdk:"owner"`
	Application                          *utils.NameModel         `tfsdk:"application"`
	Workflow                             *utils.IdNameModel       `tfsdk:"workflow"`
	Maintainers                          []*utils.MaintainerModel `tfsdk:"maintainers"`
}

IntegrationDataSourceModel describes the data source data model.

type IntegrationResource

type IntegrationResource struct {
	// contains filtered or unexported fields
}

IntegrationResource defines the resource implementation.

func (*IntegrationResource) Configure

func (*IntegrationResource) Create

Create this function is responsible for creating a new resource of type Entitle Integration.

Its reads the Terraform plan data provided in req.Plan and maps it to the IntegrationResourceModel. And sends a request to the Entitle API to create the resource using API requests. If the creation is successful, it saves the resource's data into Terraform state.

func (*IntegrationResource) Delete

Delete this function is responsible for deleting an existing resource of type

It reads the resource's data from Terraform state, extracts the unique identifier, and sends a request to delete the resource using API requests. If the deletion is successful, it removes the resource from Terraform state.

func (*IntegrationResource) ImportState

ImportState this function is used to import an existing resource's state into Terraform.

It extracts the resource's identifier from the import request and sets it in Terraform state using resource.ImportStatePassthroughID.

func (*IntegrationResource) Metadata

func (*IntegrationResource) Read

Read this function is used to read an existing resource of type Entitle Integration.

It retrieves the resource's data from the provider API requests. The retrieved data is then mapped to the IntegrationResourceModel, and the data is saved to Terraform state.

func (*IntegrationResource) Schema

func (*IntegrationResource) Update

Update this function handles updates to an existing resource of type Entitle Integration.

It reads the updated Terraform plan data provided in req.Plan and maps it to the IntegrationResourceModel. And sends a request to the Entitle API to update the resource using API requests. If the update is successful, it saves the updated resource data into Terraform state.

type IntegrationResourceModel

type IntegrationResourceModel struct {
	ID                                   types.String             `tfsdk:"id"`
	Name                                 types.String             `tfsdk:"name"`
	AllowedDurations                     types.List               `tfsdk:"allowed_durations"`
	AllowChangingAccountPermissions      types.Bool               `tfsdk:"allow_changing_account_permissions"`
	AllowCreatingAccounts                types.Bool               `tfsdk:"allow_creating_accounts"`
	Readonly                             types.Bool               `tfsdk:"readonly"`
	AllowRequests                        types.Bool               `tfsdk:"allow_requests"`
	AllowRequestsByDefault               types.Bool               `tfsdk:"allow_requests_by_default"`
	AllowAsGrantMethod                   types.Bool               `tfsdk:"allow_as_grant_method"`
	AllowAsGrantMethodByDefault          types.Bool               `tfsdk:"allow_as_grant_method_by_default"`
	AutoAssignRecommendedMaintainers     types.Bool               `tfsdk:"auto_assign_recommended_maintainers"`
	AutoAssignRecommendedOwners          types.Bool               `tfsdk:"auto_assign_recommended_owners"`
	NotifyAboutExternalPermissionChanges types.Bool               `tfsdk:"notify_about_external_permission_changes"`
	Owner                                *utils.IdEmailModel      `tfsdk:"owner"`
	Application                          *utils.NameModel         `tfsdk:"application"`
	AgentToken                           *utils.NameModel         `tfsdk:"agent_token"`
	Workflow                             *utils.IdNameModel       `tfsdk:"workflow"`
	Maintainers                          []*utils.MaintainerModel `tfsdk:"maintainers"`
	ConnectionJson                       types.String             `tfsdk:"connection_json"`
}

IntegrationResourceModel describes the resource data model.

Jump to

Keyboard shortcuts

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