agentTokens

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: 16 Imported by: 0

Documentation

Overview

Package agentTokens provides the implementation of the Entitle Agent Token data source for Terraform. This data source allows Terraform to query information about Agent Tokens from the Entitle API.

Package agentTokens provides the implementation of the Entitle Agent Token resource for Terraform. It defines the resource type, its schema, and the CRUD operations for managing Agent Tokens.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAgentTokenDataSource

func NewAgentTokenDataSource() datasource.DataSource

NewAgentTokenDataSource creates a new instance of AgentTokenDataSource.

func NewAgentTokenResource

func NewAgentTokenResource() resource.Resource

NewAgentTokenResource creates a new instance of the AgentTokenResource.

Types

type AgentTokenDataSource

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

AgentTokenDataSource defines the implementation of the data source.

func (*AgentTokenDataSource) Configure

Configure configures the data source with the provided client.

func (*AgentTokenDataSource) Metadata

Metadata sets the metadata for the data source.

func (*AgentTokenDataSource) Read

Read retrieves data from the Entitle API and populates the data source state. This function is responsible for fetching details about an Agent Token from the Entitle API based on the provided Terraform configuration. It reads the configuration data into a model, sends a request to the Entitle API, and processes the API response. The retrieved data is then saved into Terraform state for further use in the Terraform plan.

func (*AgentTokenDataSource) Schema

Schema sets the schema for the data source.

type AgentTokenDataSourceModel

type AgentTokenDataSourceModel struct {
	ID   types.String `tfsdk:"id"`
	Name types.String `tfsdk:"name"`
}

AgentTokenDataSourceModel describes the data source data model.

type AgentTokenResource

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

AgentTokenResource defines the resource implementation.

func (*AgentTokenResource) Configure

Configure configures the resource with the provided client.

func (*AgentTokenResource) Create

Create handles the creation of a new resource of type Entitle AgentToken.

It reads the Terraform plan data, maps it to the AgentTokenResourceModel, sends a request to the Entitle API to create the resource, and saves the resource's data into Terraform state.

func (*AgentTokenResource) Delete

Delete is responsible for deleting an existing resource of type Entitle AgentToken.

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 (*AgentTokenResource) ImportState

ImportState 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 (*AgentTokenResource) Metadata

Metadata sets the metadata for the resource.

func (*AgentTokenResource) Read

Read retrieves an existing resource of type Entitle AgentToken.

It retrieves the resource's data from the provider API requests, maps it to the AgentTokenResourceModel, and saves the data to Terraform state.

func (*AgentTokenResource) Schema

Schema sets the schema for the resource.

func (*AgentTokenResource) Update

Update handles updates to an existing resource of type Entitle AgentToken.

It reads the updated Terraform plan data, sends a request to the Entitle API to update the resource, and saves the updated resource data into Terraform state.

type AgentTokenResourceModel

type AgentTokenResourceModel struct {
	ID    types.String `tfsdk:"id"`
	Name  types.String `tfsdk:"name"`
	Token types.String `tfsdk:"token"`
}

AgentTokenResourceModel describes the resource data model.

Jump to

Keyboard shortcuts

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