Documentation ¶
Index ¶
- func GetDataSourceMeta(req datasource.ConfigureRequest, resp *datasource.ConfigureResponse) *config.Config
- func GetResourceMeta(req resource.ConfigureRequest, resp *resource.ConfigureResponse) *config.Config
- func IDAttribute(description string) schema.StringAttribute
- func IDAttributeDefaultDescription() schema.StringAttribute
- type BaseDataSource
- type BaseDataSourceConfig
- type BaseResource
- func (r *BaseResource) Configure(ctx context.Context, req resource.ConfigureRequest, ...)
- func (r *BaseResource) ImportState(ctx context.Context, req resource.ImportStateRequest, ...)
- func (r *BaseResource) Metadata(ctx context.Context, req resource.MetadataRequest, ...)
- func (r *BaseResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
- type BaseResourceConfig
- type WithTimeouts
- func (w *WithTimeouts) CreateTimeout(ctx context.Context, timeouts timeouts.Value) time.Duration
- func (w *WithTimeouts) DeleteTimeout(ctx context.Context, timeouts timeouts.Value) time.Duration
- func (w *WithTimeouts) ReadTimeout(ctx context.Context, timeouts timeouts.Value) time.Duration
- func (w *WithTimeouts) SetDefaultCreateTimeout(timeout time.Duration)
- func (w *WithTimeouts) SetDefaultDeleteTimeout(timeout time.Duration)
- func (w *WithTimeouts) SetDefaultReadTimeout(timeout time.Duration)
- func (w *WithTimeouts) SetDefaultUpdateTimeout(timeout time.Duration)
- func (w *WithTimeouts) UpdateTimeout(ctx context.Context, timeouts timeouts.Value) time.Duration
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDataSourceMeta ¶
func GetDataSourceMeta( req datasource.ConfigureRequest, resp *datasource.ConfigureResponse, ) *config.Config
func GetResourceMeta ¶
func GetResourceMeta( req resource.ConfigureRequest, resp *resource.ConfigureResponse, ) *config.Config
func IDAttribute ¶
func IDAttribute(description string) schema.StringAttribute
func IDAttributeDefaultDescription ¶
func IDAttributeDefaultDescription() schema.StringAttribute
Types ¶
type BaseDataSource ¶
type BaseDataSource struct { Config BaseDataSourceConfig Meta *config.Config }
BaseDataSource contains various re-usable fields and methods intended for use in data source implementations by composition.
func NewBaseDataSource ¶
func NewBaseDataSource(cfg BaseDataSourceConfig) BaseDataSource
NewBaseDataSource returns a new instance of the BaseDataSource struct for cleaner initialization.
func (*BaseDataSource) Configure ¶
func (r *BaseDataSource) Configure( ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse, )
func (*BaseDataSource) Metadata ¶
func (r *BaseDataSource) Metadata( ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse, )
func (*BaseDataSource) Schema ¶
func (r *BaseDataSource) Schema( ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse, )
type BaseDataSourceConfig ¶
BaseDataSourceConfig contains all configurable base resource fields.
type BaseResource ¶
type BaseResource struct { Config BaseResourceConfig Meta *config.Config }
BaseResource contains various re-usable fields and methods intended for use in resource implementations by composition.
func NewBaseResource ¶
func NewBaseResource(cfg BaseResourceConfig) BaseResource
NewBaseResource returns a new instance of the BaseResource struct for cleaner initialization.
func (*BaseResource) Configure ¶
func (r *BaseResource) Configure( ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse, )
func (*BaseResource) ImportState ¶
func (r *BaseResource) ImportState( ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse, )
ImportState should be overridden for resources with complex read logic (e.g. parent ID).
func (*BaseResource) Metadata ¶
func (r *BaseResource) Metadata( ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse, )
func (*BaseResource) Schema ¶
func (r *BaseResource) Schema( ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse, )
type BaseResourceConfig ¶
BaseResourceConfig contains all configurable base resource fields.
type WithTimeouts ¶ added in v1.29.0
type WithTimeouts struct {
// contains filtered or unexported fields
}
WithTimeouts is intended to be embedded in resources which use the special "timeouts" nested block. See https://developer.hashicorp.com/terraform/language/resources/syntax#operation-timeouts.
func (*WithTimeouts) CreateTimeout ¶ added in v1.29.0
CreateTimeout returns any configured Create timeout value or the default value.
func (*WithTimeouts) DeleteTimeout ¶ added in v1.29.0
DeleteTimeout returns any configured Delete timeout value or the default value.
func (*WithTimeouts) ReadTimeout ¶ added in v1.29.0
ReadTimeout returns any configured Read timeout value or the default value.
func (*WithTimeouts) SetDefaultCreateTimeout ¶ added in v1.29.0
func (w *WithTimeouts) SetDefaultCreateTimeout(timeout time.Duration)
SetDefaultCreateTimeout sets the resource's default Create timeout value.
func (*WithTimeouts) SetDefaultDeleteTimeout ¶ added in v1.29.0
func (w *WithTimeouts) SetDefaultDeleteTimeout(timeout time.Duration)
SetDefaultDeleteTimeout sets the resource's default Delete timeout value.
func (*WithTimeouts) SetDefaultReadTimeout ¶ added in v1.29.0
func (w *WithTimeouts) SetDefaultReadTimeout(timeout time.Duration)
SetDefaultReadTimeout sets the resource's default Read timeout value.
func (*WithTimeouts) SetDefaultUpdateTimeout ¶ added in v1.29.0
func (w *WithTimeouts) SetDefaultUpdateTimeout(timeout time.Duration)
SetDefaultUpdateTimeout sets the resource's default Update timeout value.
func (*WithTimeouts) UpdateTimeout ¶ added in v1.29.0
UpdateTimeout returns any configured Update timeout value or the default value.