Documentation ¶
Index ¶
- func New(version string) func() provider.Provider
- func NewEnvironmentVariableResource() resource.Resource
- type ChecklyProvider
- func (p *ChecklyProvider) Configure(ctx context.Context, req provider.ConfigureRequest, ...)
- func (p *ChecklyProvider) DataSources(ctx context.Context) []func() datasource.DataSource
- func (p *ChecklyProvider) Metadata(ctx context.Context, req provider.MetadataRequest, ...)
- func (p *ChecklyProvider) Resources(ctx context.Context) []func() resource.Resource
- func (p *ChecklyProvider) Schema(ctx context.Context, req provider.SchemaRequest, resp *provider.SchemaResponse)
- type ChecklyProviderModel
- type EnvironmentVariableResource
- func (r *EnvironmentVariableResource) Configure(ctx context.Context, req resource.ConfigureRequest, ...)
- func (r *EnvironmentVariableResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (r *EnvironmentVariableResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
- func (r *EnvironmentVariableResource) ImportState(ctx context.Context, req resource.ImportStateRequest, ...)
- func (r *EnvironmentVariableResource) Metadata(ctx context.Context, req resource.MetadataRequest, ...)
- func (r *EnvironmentVariableResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r *EnvironmentVariableResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
- func (r *EnvironmentVariableResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
- type EnvironmentVariableResourceModel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ChecklyProvider ¶
type ChecklyProvider struct {
// contains filtered or unexported fields
}
ChecklyProvider defines the provider implementation.
func (*ChecklyProvider) Configure ¶
func (p *ChecklyProvider) Configure(ctx context.Context, req provider.ConfigureRequest, resp *provider.ConfigureResponse)
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 ¶
func (p *ChecklyProvider) Metadata(ctx context.Context, req provider.MetadataRequest, resp *provider.MetadataResponse)
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 ¶
func (p *ChecklyProvider) Schema(ctx context.Context, req provider.SchemaRequest, resp *provider.SchemaResponse)
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 ¶
func (r *EnvironmentVariableResource) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse)
Configure prepares the checkly.Client for use by the resource.
func (*EnvironmentVariableResource) Create ¶
func (r *EnvironmentVariableResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
func (*EnvironmentVariableResource) Delete ¶
func (r *EnvironmentVariableResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
func (*EnvironmentVariableResource) ImportState ¶
func (r *EnvironmentVariableResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse)
func (*EnvironmentVariableResource) Metadata ¶
func (r *EnvironmentVariableResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse)
Metadata sets the resource name, the provider type name is "checkly".
func (*EnvironmentVariableResource) Read ¶
func (r *EnvironmentVariableResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
func (*EnvironmentVariableResource) Schema ¶
func (r *EnvironmentVariableResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
func (*EnvironmentVariableResource) Update ¶
func (r *EnvironmentVariableResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
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.