provider

package
v0.0.0-...-be5b2d3 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2023 License: MPL-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(version string) func() provider.Provider

func NewEnvironmentVariableResource

func NewEnvironmentVariableResource() resource.Resource

Types

type ChecklyProvider

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

ChecklyProvider defines the provider implementation.

func (*ChecklyProvider) Configure

Configure is called to initialize the provider with configuration values. You need to set the following terraform variables: - api_key - account_id - api_url (optional) put them in a file called `terraform.tfvars` in the root of your terraform project or use terraform CLI's -var-file="myvars.tfvars" argument example: terraform apply -var-file="dev-secrets.tfvars" alternatively you can set the following environment variables that will override any TF variables: - CHECKLY_API_KEY - CHECKLY_ACCOUNT_ID - CHECKLY_API_URL (optional)

func (*ChecklyProvider) DataSources

func (p *ChecklyProvider) DataSources(ctx context.Context) []func() datasource.DataSource

DataSources returns and empty array because we do not have any data sources yet in the Checkly provider.

func (*ChecklyProvider) Metadata

Metadata returns the provider metadata. The name 'checkly' is used in all resources as a prefix.

func (*ChecklyProvider) Resources

func (p *ChecklyProvider) Resources(ctx context.Context) []func() resource.Resource

Resources returns the list of resources supported by the provider. Add new Resources here.

func (*ChecklyProvider) Schema

Schema defines the variables for the provider. See Configure() for more info.

type ChecklyProviderModel

type ChecklyProviderModel struct {
	ApiKey    types.String `tfsdk:"api_key"`
	ApiUrl    types.String `tfsdk:"api_url"`
	AccountId types.String `tfsdk:"account_id"`
}

ChecklyProviderModel contains the provider configuration. See Schema and Configure() for more info.

type EnvironmentVariableResource

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

EnvironmentVariableResource defines the resource implementation.

func (*EnvironmentVariableResource) Configure

Configure prepares the checkly.Client for use by the resource.

func (*EnvironmentVariableResource) Create

func (*EnvironmentVariableResource) Delete

func (*EnvironmentVariableResource) ImportState

func (*EnvironmentVariableResource) Metadata

Metadata sets the resource name, the provider type name is "checkly".

func (*EnvironmentVariableResource) Read

func (*EnvironmentVariableResource) Schema

func (*EnvironmentVariableResource) Update

type EnvironmentVariableResourceModel

type EnvironmentVariableResourceModel struct {
	Key    types.String `tfsdk:"key"`
	Value  types.String `tfsdk:"value"`
	Locked types.Bool   `tfsdk:"locked"`
	Id     types.String `tfsdk:"id"`
}

EnvironmentVariableResourceModel describes the resource data model. These fields can be set in .tf files later.

func (*EnvironmentVariableResourceModel) ToChecklyEntity

func (r *EnvironmentVariableResourceModel) ToChecklyEntity() checkly.EnvironmentVariable

ToChecklyEntity converts the resource data model to a Checkly entity.

func (*EnvironmentVariableResourceModel) UpdateWithChecklyEntity

func (r *EnvironmentVariableResourceModel) UpdateWithChecklyEntity(environmentVar *checkly.EnvironmentVariable)

UpdateWithChecklyEntity updates the resource data model with the given Checkly entity.

Jump to

Keyboard shortcuts

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