Documentation ¶
Index ¶
- Constants
- func BoolDefaultValue(val bool) planmodifier.Bool
- func CopyValueAtPath(ctx context.Context, dst, src *tfsdk.State, p path.Path) error
- func DataSourceNotFoundDiag(err error) diag.Diagnostic
- func DesiredStateErrorDiag(source string, err error) diag.Diagnostic
- func Float64DefaultValue(val float64) planmodifier.Float64
- func GetCloudControlResourceDescriptionsValue(id string, descriptions []cctypes.ResourceDescription) tftypes.Value
- func Int64DefaultValue(val int64) planmodifier.Int64
- func ListOfStringDefaultValue(vals ...string) planmodifier.List
- func Multiset() planmodifier.List
- func NewPluralDataSource(_ context.Context, optFns ...DataSourceOptionsFunc) (datasource.DataSource, error)
- func NewResource(_ context.Context, optFns ...ResourceOptionsFunc) (resource.Resource, error)
- func NewSingularDataSource(_ context.Context, optFns ...DataSourceOptionsFunc) (datasource.DataSource, error)
- func ObjectDefaultValue() planmodifier.Object
- func ResourceAttributeNotSetInImportStateDiag(err error) diag.Diagnostic
- func ResourceIdentifierNotFoundDiag(err error) diag.Diagnostic
- func ResourceIdentifierNotSetDiag(err error) diag.Diagnostic
- func ResourceNotFoundAfterWriteDiag(err error) diag.Diagnostic
- func ResourceNotFoundWarningDiag(err error) diag.Diagnostic
- func ServiceOperationEmptyResultDiag(service string, operation string) diag.Diagnostic
- func ServiceOperationErrorDiag(service string, operation string, err error) diag.Diagnostic
- func ServiceOperationWaiterErrorDiag(service string, operation string, err error) diag.Diagnostic
- func SetOfStringDefaultValue(vals ...string) planmodifier.Set
- func SetUnknownValuesFromResourceModel(ctx context.Context, state *tfsdk.State, unknowns []*tftypes.AttributePath, ...) error
- func StringDefaultValue(val string) planmodifier.String
- func UnknownValuePaths(ctx context.Context, val tftypes.Value) ([]*tftypes.AttributePath, error)
- type DataSourceOptions
- func (opts DataSourceOptions) WithAttributeNameMap(v map[string]string) DataSourceOptions
- func (opts DataSourceOptions) WithCloudFormationTypeName(v string) DataSourceOptions
- func (opts DataSourceOptions) WithTerraformSchema(v schema.Schema) DataSourceOptions
- func (opts DataSourceOptions) WithTerraformTypeName(v string) DataSourceOptions
- type DataSourceOptionsFunc
- type JSONString
- func (s JSONString) Equal(other attr.Value) bool
- func (s JSONString) IsNull() bool
- func (s JSONString) IsUnknown() bool
- func (s JSONString) String() string
- func (s JSONString) ToStringValue(context.Context) (basetypes.StringValue, diag.Diagnostics)
- func (s JSONString) ToTerraformValue(ctx context.Context) (tftypes.Value, error)
- func (s JSONString) Type(_ context.Context) attr.Type
- func (s JSONString) ValueJSONString() string
- type ResourceOptions
- func (opts ResourceOptions) IsImmutableType(v bool) ResourceOptions
- func (opts ResourceOptions) WithAttributeNameMap(v map[string]string) ResourceOptions
- func (opts ResourceOptions) WithCloudFormationTypeName(v string) ResourceOptions
- func (opts ResourceOptions) WithConfigValidators(vs ...resource.ConfigValidator) ResourceOptions
- func (opts ResourceOptions) WithCreateTimeoutInMinutes(v int) ResourceOptions
- func (opts ResourceOptions) WithDeleteTimeoutInMinutes(v int) ResourceOptions
- func (opts ResourceOptions) WithSyntheticIDAttribute(v bool) ResourceOptions
- func (opts ResourceOptions) WithTerraformSchema(v schema.Schema) ResourceOptions
- func (opts ResourceOptions) WithTerraformTypeName(v string) ResourceOptions
- func (opts ResourceOptions) WithUpdateTimeoutInMinutes(v int) ResourceOptions
- func (opts ResourceOptions) WithWriteOnlyPropertyPaths(v []string) ResourceOptions
- type ResourceOptionsFunc
Constants ¶
const (
JSONStringType jsonStringType = iota
)
const (
LoggingKeyCFNType = "cfn_type"
)
Variables ¶
This section is empty.
Functions ¶
func BoolDefaultValue ¶ added in v0.44.0
func BoolDefaultValue(val bool) planmodifier.Bool
BoolDefaultValue return an AttributePlanModifier that sets the specified value if the planned value is Null and the current value is the default.
func CopyValueAtPath ¶
CopyValueAtPath copies the value at a specified path from source State to destination State.
func DataSourceNotFoundDiag ¶ added in v0.0.7
func DataSourceNotFoundDiag(err error) diag.Diagnostic
func DesiredStateErrorDiag ¶
func DesiredStateErrorDiag(source string, err error) diag.Diagnostic
func Float64DefaultValue ¶ added in v0.44.0
func Float64DefaultValue(val float64) planmodifier.Float64
Float64DefaultValue return an AttributePlanModifier that sets the specified value if the planned value is Null and the current value is the default.
func GetCloudControlResourceDescriptionsValue ¶ added in v0.0.10
func GetCloudControlResourceDescriptionsValue(id string, descriptions []cctypes.ResourceDescription) tftypes.Value
GetCloudControlResourceDescriptionsValue returns the Terraform Value for the specified Cloud Control API ResourceDescriptions.
func Int64DefaultValue ¶ added in v0.44.0
func Int64DefaultValue(val int64) planmodifier.Int64
Int64DefaultValue return an AttributePlanModifier that sets the specified value if the planned value is Null and the current value is the default.
func ListOfStringDefaultValue ¶ added in v0.44.0
func ListOfStringDefaultValue(vals ...string) planmodifier.List
ListOfStringDefaultValue return an AttributePlanModifier that sets the specified value if the planned value is Null and the current value is the default.
func Multiset ¶ added in v0.0.9
func Multiset() planmodifier.List
A multiset is an array allowing non-unique items with insertion order not significant. Multisets do not correspond directly with either Terraform Lists (insertion order is significant) or Sets (unique items). Multiset Attributes are declared as Lists with a plan modifier that suppresses semantically insignificant differences.
func NewPluralDataSource ¶ added in v0.34.0
func NewPluralDataSource(_ context.Context, optFns ...DataSourceOptionsFunc) (datasource.DataSource, error)
NewPluralDataSource returns a new plural DataSource from the specified variadic list of functional options. It's public as it's called from generated code.
func NewResource ¶ added in v0.34.0
NewResource returns a new Resource from the specified varidaic list of functional options. It's public as it's called from generated code.
func NewSingularDataSource ¶ added in v0.34.0
func NewSingularDataSource(_ context.Context, optFns ...DataSourceOptionsFunc) (datasource.DataSource, error)
NewSingularDataSource returns a new singular DataSource from the specified variadic list of functional options. It's public as it's called from generated code.
func ObjectDefaultValue ¶ added in v0.44.0
func ObjectDefaultValue() planmodifier.Object
ObjectDefaultValue return an AttributePlanModifier that sets the specified value if the planned value is Null and the current value is the default.
func ResourceAttributeNotSetInImportStateDiag ¶ added in v0.0.11
func ResourceAttributeNotSetInImportStateDiag(err error) diag.Diagnostic
func ResourceIdentifierNotFoundDiag ¶
func ResourceIdentifierNotFoundDiag(err error) diag.Diagnostic
func ResourceIdentifierNotSetDiag ¶
func ResourceIdentifierNotSetDiag(err error) diag.Diagnostic
func ResourceNotFoundAfterWriteDiag ¶ added in v0.0.14
func ResourceNotFoundAfterWriteDiag(err error) diag.Diagnostic
func ResourceNotFoundWarningDiag ¶
func ResourceNotFoundWarningDiag(err error) diag.Diagnostic
func ServiceOperationEmptyResultDiag ¶
func ServiceOperationEmptyResultDiag(service string, operation string) diag.Diagnostic
func ServiceOperationErrorDiag ¶
func ServiceOperationErrorDiag(service string, operation string, err error) diag.Diagnostic
func ServiceOperationWaiterErrorDiag ¶
func ServiceOperationWaiterErrorDiag(service string, operation string, err error) diag.Diagnostic
func SetOfStringDefaultValue ¶ added in v0.44.0
func SetOfStringDefaultValue(vals ...string) planmodifier.Set
SetOfStringDefaultValue return an AttributePlanModifier that sets the specified value if the planned value is Null and the current value is the default.
func SetUnknownValuesFromResourceModel ¶ added in v0.10.0
func SetUnknownValuesFromResourceModel(ctx context.Context, state *tfsdk.State, unknowns []*tftypes.AttributePath, resourceModel string, cfToTfNameMap map[string]string) error
SetUnknownValuesFromResourceModel fills any unknown State values from a Cloud Control ResourceModel (string). The unknown value paths are obtained from the State via a previous call to UnknownValuePaths. Functionality is split between these 2 functions, rather than calling UnknownValuePaths from within this function, so as to avoid unnecessary Cloud Control API calls to obtain the current ResourceModel.
func StringDefaultValue ¶ added in v0.44.0
func StringDefaultValue(val string) planmodifier.String
StringDefaultValue return an AttributePlanModifier that sets the specified value if the planned value is Null and the current value is the default.
func UnknownValuePaths ¶ added in v0.10.0
UnknownValuePaths returns all the paths to all the unknown values in the specified Terraform Value.
Types ¶
type DataSourceOptions ¶ added in v0.34.0
type DataSourceOptions []DataSourceOptionsFunc
func (DataSourceOptions) WithAttributeNameMap ¶ added in v0.34.0
func (opts DataSourceOptions) WithAttributeNameMap(v map[string]string) DataSourceOptions
WithAttributeNameMap is a helper function to construct functional options that set a resource type's attribute name map, append that function to the current slice of functional options and return the new slice of options. It is intended to be chained with other similar helper functions in a builder pattern.
func (DataSourceOptions) WithCloudFormationTypeName ¶ added in v0.34.0
func (opts DataSourceOptions) WithCloudFormationTypeName(v string) DataSourceOptions
WithCloudFormationTypeName is a helper function to construct functional options that set a resource type's CloudFormation type name, append that function to the current slice of functional options and return the new slice of options. It is intended to be chained with other similar helper functions in a builder pattern.
func (DataSourceOptions) WithTerraformSchema ¶ added in v0.34.0
func (opts DataSourceOptions) WithTerraformSchema(v schema.Schema) DataSourceOptions
WithTerraformSchema is a helper function to construct functional options that set a resource type's Terraform schema, append that function to the current slice of functional options and return the new slice of options. It is intended to be chained with other similar helper functions in a builder pattern.
func (DataSourceOptions) WithTerraformTypeName ¶ added in v0.34.0
func (opts DataSourceOptions) WithTerraformTypeName(v string) DataSourceOptions
WithTerraformTypeName is a helper function to construct functional options that set a resource type's Terraform type name, append that function to the current slice of functional options and return the new slice of options. It is intended to be chained with other similar helper functions in a builder pattern.
type DataSourceOptionsFunc ¶ added in v0.34.0
type DataSourceOptionsFunc func(*genericDataSource) error
DataSourceOptionsFunc is a type alias for a data source type functional option.
type JSONString ¶ added in v0.22.0
type JSONString struct {
// contains filtered or unexported fields
}
A JSONString is a string containing a valid JSON document.
func JSONStringNull ¶ added in v0.40.0
func JSONStringNull() JSONString
func JSONStringUnknown ¶ added in v0.40.0
func JSONStringUnknown() JSONString
func JSONStringValue ¶ added in v0.40.0
func JSONStringValue(value string) JSONString
func (JSONString) IsNull ¶ added in v0.25.0
func (s JSONString) IsNull() bool
IsNull returns true if the Value is not set, or is explicitly set to null.
func (JSONString) IsUnknown ¶ added in v0.25.0
func (s JSONString) IsUnknown() bool
IsUnknown returns true if the Value is not yet known.
func (JSONString) String ¶ added in v0.25.0
func (s JSONString) String() string
String returns a summary representation of either the underlying Value, or UnknownValueString (`<unknown>`) when IsUnknown() returns true, or NullValueString (`<null>`) when IsNull() return true.
This is an intentionally lossy representation, that are best suited for logging and error reporting, as they are not protected by compatibility guarantees within the framework.
func (JSONString) ToStringValue ¶ added in v0.44.0
func (s JSONString) ToStringValue(context.Context) (basetypes.StringValue, diag.Diagnostics)
func (JSONString) ToTerraformValue ¶ added in v0.25.0
func (JSONString) ValueJSONString ¶ added in v0.40.0
func (s JSONString) ValueJSONString() string
JSONStringValue returns the known string value. If JSONString is null or unknown, returns "".
type ResourceOptions ¶ added in v0.34.0
type ResourceOptions []ResourceOptionsFunc
ResourceOptions is a type alias for a slice of resource type functional options.
func (ResourceOptions) IsImmutableType ¶ added in v0.34.0
func (opts ResourceOptions) IsImmutableType(v bool) ResourceOptions
IsImmutableType is a helper function to construct functional options that set a resource type's Terraform immutability flag, append that function to the current slice of functional options and return the new slice of options. It is intended to be chained with other similar helper functions in a builder pattern.
func (ResourceOptions) WithAttributeNameMap ¶ added in v0.34.0
func (opts ResourceOptions) WithAttributeNameMap(v map[string]string) ResourceOptions
WithAttributeNameMap is a helper function to construct functional options that set a resource type's attribute name map, append that function to the current slice of functional options and return the new slice of options. It is intended to be chained with other similar helper functions in a builder pattern.
func (ResourceOptions) WithCloudFormationTypeName ¶ added in v0.34.0
func (opts ResourceOptions) WithCloudFormationTypeName(v string) ResourceOptions
WithCloudFormationTypeName is a helper function to construct functional options that set a resource type's CloudFormation type name, append that function to the current slice of functional options and return the new slice of options. It is intended to be chained with other similar helper functions in a builder pattern.
func (ResourceOptions) WithConfigValidators ¶ added in v0.44.0
func (opts ResourceOptions) WithConfigValidators(vs ...resource.ConfigValidator) ResourceOptions
WithConfigValidators is a helper function to construct functional options that set a resource type's config validators, append that function to the current slice of functional options and return the new slice of options. It is intended to be chained with other similar helper functions in a builder pattern.
func (ResourceOptions) WithCreateTimeoutInMinutes ¶ added in v0.34.0
func (opts ResourceOptions) WithCreateTimeoutInMinutes(v int) ResourceOptions
WithCreateTimeoutInMinutes is a helper function to construct functional options that set a resource type's create timeout, append that function to the current slice of functional options and return the new slice of options. It is intended to be chained with other similar helper functions in a builder pattern.
func (ResourceOptions) WithDeleteTimeoutInMinutes ¶ added in v0.34.0
func (opts ResourceOptions) WithDeleteTimeoutInMinutes(v int) ResourceOptions
WithDeleteTimeoutInMinutes is a helper function to construct functional options that set a resource type's delete timeout, append that function to the current slice of functional options and return the new slice of options. It is intended to be chained with other similar helper functions in a builder pattern.
func (ResourceOptions) WithSyntheticIDAttribute ¶ added in v0.34.0
func (opts ResourceOptions) WithSyntheticIDAttribute(v bool) ResourceOptions
WithSyntheticIDAttribute is a helper function to construct functional options that set a resource type's synthetic ID attribute flag, append that function to the current slice of functional options and return the new slice of options. It is intended to be chained with other similar helper functions in a builder pattern.
func (ResourceOptions) WithTerraformSchema ¶ added in v0.34.0
func (opts ResourceOptions) WithTerraformSchema(v schema.Schema) ResourceOptions
WithTerraformSchema is a helper function to construct functional options that set a resource type's Terraform schema, append that function to the current slice of functional options and return the new slice of options. It is intended to be chained with other similar helper functions in a builder pattern.
func (ResourceOptions) WithTerraformTypeName ¶ added in v0.34.0
func (opts ResourceOptions) WithTerraformTypeName(v string) ResourceOptions
WithTerraformTypeName is a helper function to construct functional options that set a resource type's Terraform type name, append that function to the current slice of functional options and return the new slice of options. It is intended to be chained with other similar helper functions in a builder pattern.
func (ResourceOptions) WithUpdateTimeoutInMinutes ¶ added in v0.34.0
func (opts ResourceOptions) WithUpdateTimeoutInMinutes(v int) ResourceOptions
WithUpdateTimeoutInMinutes is a helper function to construct functional options that set a resource type's update timeout, append that function to the current slice of functional options and return the new slice of options. It is intended to be chained with other similar helper functions in a builder pattern.
func (ResourceOptions) WithWriteOnlyPropertyPaths ¶ added in v0.34.0
func (opts ResourceOptions) WithWriteOnlyPropertyPaths(v []string) ResourceOptions
WithWriteOnlyPropertyPaths is a helper function to construct functional options that set a resource type's write-only property paths, append that function to the current slice of functional options and return the new slice of options. It is intended to be chained with other similar helper functions in a builder pattern.
type ResourceOptionsFunc ¶ added in v0.34.0
type ResourceOptionsFunc func(*genericResource) error
ResourceOptionsFunc is a type alias for a resource type functional option.