Documentation
¶
Index ¶
- func AddOptionalFieldsToSchema(schema map[string]*schema.Schema, keys ...string)
- func FixDatasourceSchemaFlags(schema map[string]*schema.Schema, required bool, keys ...string)
- func NewRegionalID(idI interface{}, fallBackRegion scw.Region) string
- func NewZonedID(idI interface{}, fallBackZone scw.Zone) string
- func SchemaFromResourceSchema(rs map[string]*schema.Schema) map[string]*schema.Schema
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddOptionalFieldsToSchema ¶
AddOptionalFieldsToSchema
code imported from Google's terraform provider. source: https://github.com/hashicorp/terraform-provider-google/blob/main/google/tpgresource/datasource_helpers.go
func FixDatasourceSchemaFlags ¶
FixDatasourceSchemaFlags is a convenience func that toggles the Computed, Optional + Required flags on a schema element. This is useful when the schema has been generated (using `datasourceSchemaFromResourceSchema` above for example) and therefore the attribute flags were not set appropriately when first added to the schema definition. Currently only supports top-level schema elements.
code imported from Google's terraform provider. source: https://github.com/hashicorp/terraform-provider-google/blob/main/google/tpgresource/datasource_helpers.go
func NewRegionalID ¶
func NewZonedID ¶
func SchemaFromResourceSchema ¶
SchemaFromResourceSchema is a recursive func that converts an existing Resource schema to a Datasource schema. All schema elements are copied, but certain attributes are ignored or changed: - all attributes have Computed = true - all attributes have ForceNew, Required = false - Validation funcs and attributes (e.g. MaxItems) are not copied
code imported from Google's terraform provider. source: https://github.com/hashicorp/terraform-provider-google/blob/main/google/tpgresource/datasource_helpers.go
Types ¶
This section is empty.