Documentation
¶
Index ¶
- Constants
- func BuildComputeCreateInput(serviceID string, version int, m ComputeNestedModel) *fastly.CreateOpenstackInput
- func BuildComputeUpdateInput(serviceID string, version int, m ComputeNestedModel) *fastly.UpdateOpenstackInput
- func BuildCreateInput(serviceID string, version int, m NestedModel) *fastly.CreateOpenstackInput
- func BuildUpdateInput(serviceID string, version int, m NestedModel) *fastly.UpdateOpenstackInput
- func ClearVCLOnlyCreateFields(input *fastly.CreateOpenstackInput)
- func ClearVCLOnlyUpdateFields(input *fastly.UpdateOpenstackInput)
- func CommonAttributes() map[string]schema.Attribute
- func ComputeAttributes() map[string]schema.Attribute
- func ComputeEqual(a, b []ComputeNestedModel) bool
- func ComputeNestedBlockSchema() schema.ListNestedBlock
- func ComputeReconcile(ctx context.Context, client *fastly.Client, serviceID string, version int, ...) error
- func Equal(a, b []NestedModel) bool
- func NestedBlockSchema() schema.ListNestedBlock
- func NewAuthenticationObject(user, accessKey types.String) types.Object
- func NewListResource() list.ListResource
- func NewResource() resource.Resource
- func Reconcile(ctx context.Context, client *fastly.Client, serviceID string, version int, ...) error
- func ResetVCLOnlyToDefaults(m *NestedModel)
- func ResourceAttributes() map[string]schema.Attribute
- func ValidateConditionReferences(endpoints []NestedModel, conditionNames map[string]struct{}) error
- func ValidateNoVCLOnlyAttributesForCompute(ctx context.Context, cfg tfsdk.Config) diag.Diagnostics
- type ComputeNestedModel
- type ListResource
- func (l *ListResource) Configure(_ context.Context, req resource.ConfigureRequest, ...)
- func (l *ListResource) List(ctx context.Context, req list.ListRequest, stream *list.ListResultsStream)
- func (l *ListResource) ListResourceConfigSchema(_ context.Context, _ list.ListResourceSchemaRequest, ...)
- func (l *ListResource) Metadata(_ context.Context, req resource.MetadataRequest, ...)
- type Model
- type NestedModel
- type Resource
- func (r *Resource) Configure(_ context.Context, req resource.ConfigureRequest, ...)
- func (r *Resource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (r *Resource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
- func (r *Resource) IdentitySchema(_ context.Context, _ resource.IdentitySchemaRequest, ...)
- func (r *Resource) ImportState(ctx context.Context, req resource.ImportStateRequest, ...)
- func (r *Resource) Metadata(_ context.Context, req resource.MetadataRequest, ...)
- func (r *Resource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r *Resource) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse)
- func (r *Resource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
Constants ¶
const ( DefaultFormatVersion = 2 // DefaultGzipLevel is a sentinel meaning "gzip_level not configured". A real // value is 0-9, so -1 lets the provider distinguish an unset level from an // explicit 0 (valid "no compression"). An unset level is never written, // because the API rejects requests that set both compression_codec and // gzip_level, and it auto-manages the level otherwise (e.g. 3 for gzip). DefaultGzipLevel = -1 DefaultMessageType = "classic" DefaultPath = "" DefaultPeriod = 3600 DefaultTimestampFormat = "%Y-%m-%dT%H:%M:%S.000" DefaultCompressionCodec = "" DefaultResponseCondition = "" DefaultProcessingRegion = "none" DefaultPublicKey = "" )
Variables ¶
This section is empty.
Functions ¶
func BuildComputeCreateInput ¶
func BuildComputeCreateInput(serviceID string, version int, m ComputeNestedModel) *fastly.CreateOpenstackInput
BuildComputeCreateInput is BuildCreateInput for Compute services: it never sets format, format_version, placement, or response_condition, since those only affect generated VCL and Compute services don't have any.
func BuildComputeUpdateInput ¶
func BuildComputeUpdateInput(serviceID string, version int, m ComputeNestedModel) *fastly.UpdateOpenstackInput
BuildComputeUpdateInput is BuildUpdateInput for Compute services: it never sets format, format_version, placement, or response_condition, since those only affect generated VCL and Compute services don't have any.
func BuildCreateInput ¶
func BuildCreateInput(serviceID string, version int, m NestedModel) *fastly.CreateOpenstackInput
func BuildUpdateInput ¶
func BuildUpdateInput(serviceID string, version int, m NestedModel) *fastly.UpdateOpenstackInput
func ClearVCLOnlyCreateFields ¶
func ClearVCLOnlyCreateFields(input *fastly.CreateOpenstackInput)
ClearVCLOnlyCreateFields nils out format, format_version, placement, and response_condition on a CreateOpenstackInput. The standalone fastly_service_logging_openstack resource shares one schema across both service types, so this is called instead of BuildComputeCreateInput to strip the VCL-only fields once the service is confirmed to be Compute.
func ClearVCLOnlyUpdateFields ¶
func ClearVCLOnlyUpdateFields(input *fastly.UpdateOpenstackInput)
ClearVCLOnlyUpdateFields is ClearVCLOnlyCreateFields for UpdateOpenstackInput.
func CommonAttributes ¶
CommonAttributes returns the full OpenStack logging attribute set — the shared attributes plus the VCL-only ones (format, format_version, placement, response_condition). Used by the standalone fastly_service_logging_openstack resource (which can attach to either service type) and the VCL nested block (NestedBlockSchema). Compute services use ComputeAttributes instead.
func ComputeAttributes ¶
ComputeAttributes returns the OpenStack logging attribute set for Compute services, omitting the VCL-only attributes exposed by CommonAttributes.
func ComputeEqual ¶
func ComputeEqual(a, b []ComputeNestedModel) bool
func ComputeNestedBlockSchema ¶
func ComputeNestedBlockSchema() schema.ListNestedBlock
ComputeNestedBlockSchema returns the OpenStack logging nested block schema for Compute services (service_compute_auto.logging_openstack), omitting the VCL-only attributes.
func ComputeReconcile ¶
func Equal ¶
func Equal(a, b []NestedModel) bool
func NestedBlockSchema ¶
func NestedBlockSchema() schema.ListNestedBlock
NestedBlockSchema returns the OpenStack logging nested block schema for VCL services (service_cdn_auto.logging_openstack), including the VCL-only attributes.
func NewAuthenticationObject ¶
func NewListResource ¶
func NewListResource() list.ListResource
func NewResource ¶
func ResetVCLOnlyToDefaults ¶
func ResetVCLOnlyToDefaults(m *NestedModel)
ResetVCLOnlyToDefaults restores the VCL-only fields to their schema defaults after a flatten. On a Compute service they are never sent, so the API's own values are discarded rather than reported as a diff against the plan.
func ResourceAttributes ¶
func ValidateConditionReferences ¶
func ValidateConditionReferences(endpoints []NestedModel, conditionNames map[string]struct{}) error
ValidateConditionReferences rejects a response_condition naming a condition block absent from config.
func ValidateNoVCLOnlyAttributesForCompute ¶
ValidateNoVCLOnlyAttributesForCompute returns an error diagnostic if format, format_version, placement, or response_condition are explicitly configured on a Compute service. The standalone fastly_service_logging_openstack resource has one schema shared by both service types — unlike the nested blocks, which have distinct VCL (NestedBlockSchema) and Compute (ComputeNestedBlockSchema) schemas — so this is the only way to catch the mistake before it silently sends unsupported VCL-only attributes to a Compute service.
Types ¶
type ComputeNestedModel ¶
type ComputeNestedModel struct {
// contains filtered or unexported fields
}
ComputeNestedModel is the OpenStack logging model for the Compute nested block (service_compute_auto.logging_openstack). It omits format, format_version, placement, and response_condition, which only apply to VCL services.
func ComputeMatchOrder ¶
func ComputeMatchOrder(items, order []ComputeNestedModel) []ComputeNestedModel
func ComputeReadForVersion ¶
func FlattenToComputeNestedModel ¶
func FlattenToComputeNestedModel(o *fastly.Openstack) ComputeNestedModel
FlattenToComputeNestedModel is FlattenToNestedModel for Compute services: it carries over only the attributes ComputeNestedModel exposes.
func (ComputeNestedModel) ModelsEqual ¶
func (c ComputeNestedModel) ModelsEqual(other ComputeNestedModel) bool
type ListResource ¶
type ListResource struct {
// contains filtered or unexported fields
}
func (*ListResource) Configure ¶
func (l *ListResource) Configure(_ context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse)
func (*ListResource) List ¶
func (l *ListResource) List(ctx context.Context, req list.ListRequest, stream *list.ListResultsStream)
func (*ListResource) ListResourceConfigSchema ¶
func (l *ListResource) ListResourceConfigSchema(_ context.Context, _ list.ListResourceSchemaRequest, resp *list.ListResourceSchemaResponse)
func (*ListResource) Metadata ¶
func (l *ListResource) Metadata(_ context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse)
type Model ¶
type NestedModel ¶
type NestedModel struct {
Format types.String `tfsdk:"format"`
FormatVersion types.Int64 `tfsdk:"format_version"`
Placement types.String `tfsdk:"placement"`
ResponseCondition types.String `tfsdk:"response_condition"`
// contains filtered or unexported fields
}
NestedModel is the OpenStack logging model for the standalone fastly_service_logging_openstack resource and the VCL nested block (service_cdn_auto.logging_openstack).
func FlattenToNestedModel ¶
func FlattenToNestedModel(o *fastly.Openstack) NestedModel
func MatchOrder ¶
func MatchOrder(items, order []NestedModel) []NestedModel
func ReadForVersion ¶
func (NestedModel) ModelsEqual ¶
func (n NestedModel) ModelsEqual(other NestedModel) bool
type Resource ¶
type Resource struct {
// contains filtered or unexported fields
}
func (*Resource) Configure ¶
func (r *Resource) Configure(_ context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse)
func (*Resource) Create ¶
func (r *Resource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
func (*Resource) Delete ¶
func (r *Resource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
func (*Resource) IdentitySchema ¶ added in v0.2.2
func (r *Resource) IdentitySchema(_ context.Context, _ resource.IdentitySchemaRequest, resp *resource.IdentitySchemaResponse)
func (*Resource) ImportState ¶
func (r *Resource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse)
func (*Resource) Metadata ¶
func (r *Resource) Metadata(_ context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse)
func (*Resource) Read ¶
func (r *Resource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
func (*Resource) Schema ¶
func (r *Resource) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse)
func (*Resource) Update ¶
func (r *Resource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)