Documentation ¶
Index ¶
- func Bool(d ResourceData, key string, conditions ...Condition) (b *bool)
- func Configure(ctx context.Context, data *schema.ResourceData) (interface{}, diag.Diagnostics)
- func Diff(d ResourceData, key string) (add []interface{}, rm []interface{})
- func Float64(d ResourceData, key string, conditions ...Condition) (f *float64)
- func Int(d ResourceData, key string, conditions ...Condition) (i *int)
- func JSON(d ResourceData, key string, conditions ...Condition) (m map[string]interface{}, err error)
- func Map(d ResourceData, key string, conditions ...Condition) (m map[string]interface{})
- func Provider() *schema.Provider
- func SDKVersion() string
- func Slice(d ResourceData, key string, conditions ...Condition) (s []interface{})
- func String(d ResourceData, key string, conditions ...Condition) (s *string)
- func TerraformSDKVersion() string
- func TerraformVersion() string
- func Version() string
- type Condition
- type Iterator
- type MapData
- func (md MapData) Get(key string) interface{}
- func (md MapData) GetChange(key string) (interface{}, interface{})
- func (md MapData) GetOk(key string) (interface{}, bool)
- func (md MapData) GetOkExists(key string) (interface{}, bool)
- func (md MapData) HasChange(key string) bool
- func (md MapData) IsNewResource() bool
- func (md MapData) Set(key string, value interface{}) error
- type ResourceData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Bool ¶ added in v0.1.1
func Bool(d ResourceData, key string, conditions ...Condition) (b *bool)
Bool accesses the value held by key and type asserts it to a pointer to a bool.
func Configure ¶ added in v0.21.1
func Configure(ctx context.Context, data *schema.ResourceData) (interface{}, diag.Diagnostics)
func Diff ¶ added in v0.21.1
func Diff(d ResourceData, key string) (add []interface{}, rm []interface{})
Diff accesses the value held by key and type asserts it to a set. It then compares it's changes if any and returns what needs to be added and what needs to be removed.
func Float64 ¶ added in v0.21.1
func Float64(d ResourceData, key string, conditions ...Condition) (f *float64)
Float64 accesses the value held by key and type asserts it to a pointer to a float64.
func Int ¶ added in v0.1.1
func Int(d ResourceData, key string, conditions ...Condition) (i *int)
Int accesses the value held by key and type asserts it to a pointer to a int.
func JSON ¶ added in v0.21.1
func JSON(d ResourceData, key string, conditions ...Condition) (m map[string]interface{}, err error)
JSON accesses the value held by key and unmarshals it into a map.
func Map ¶ added in v0.1.1
func Map(d ResourceData, key string, conditions ...Condition) (m map[string]interface{})
Map accesses the value held by key and type asserts it to a map.
func SDKVersion ¶ added in v0.21.1
func SDKVersion() string
func Slice ¶ added in v0.1.1
func Slice(d ResourceData, key string, conditions ...Condition) (s []interface{})
Slice accesses the value held by key and type asserts it to a slice.
func String ¶ added in v0.1.1
func String(d ResourceData, key string, conditions ...Condition) (s *string)
String accesses the value held by key and type asserts it to a pointer to a string.
func TerraformSDKVersion ¶ added in v0.21.1
func TerraformSDKVersion() string
func TerraformVersion ¶ added in v0.21.1
func TerraformVersion() string
Types ¶
type Condition ¶ added in v0.21.1
type Condition func(d ResourceData, key string) bool
Condition is a function that checks whether a condition holds true for a value being accessed.
It is used with accessor functions such as Int, String, etc to only retrieve the value if the conditions hold true.
func All ¶ added in v0.21.1
All is a condition that evaluates to true if all of its child conditions evaluate to true.
func Any ¶ added in v0.21.1
Any is a condition that evaluates to true if any of its enclosed conditions evaluate to true. If it is not passed any conditions it will be considered unconditional, therefore it will evaluate to true.
func HasChange ¶ added in v0.21.1
func HasChange() Condition
HasChange is a condition that evaluates to true if the value accessed has changed.
func IsNewResource ¶ added in v0.21.1
func IsNewResource() Condition
IsNewResource is a condition that evaluates to true if the resource access is new.
type Iterator ¶ added in v0.1.8
type Iterator interface { Elem(func(d ResourceData)) List() []interface{} }
Iterator is used to iterate over a list or set.
Elem iterates over all elements of the list or set, calling fn with each iteration. The callback takes a Data interface as argument which is prefixed with its parents key, allowing for convenient nested data access.
List returns the underlying list as a Go slice.
type MapData ¶ added in v0.1.8
type MapData map[string]interface{}
MapData wraps a map satisfying the Data interface, so it can be used in the accessor methods defined below.
func (MapData) GetOkExists ¶ added in v0.1.9
func (MapData) IsNewResource ¶ added in v0.21.1
type ResourceData ¶ added in v0.21.1
type ResourceData interface { // IsNewResource reports whether or not the resource is seen for the first // time. If so, checks for change won't be carried out. IsNewResource() bool // HasChange reports whether or not the given key has been changed. HasChange(key string) bool // GetChange returns the old and new value for a given key. GetChange(key string) (interface{}, interface{}) // Get returns the data for the given key, or nil if the key doesn't exist // in the schema. Get(key string) interface{} // GetOk returns the data for the given key and whether or not the key // has been set to a non-zero value at some point. // // The first result will not necessarilly be nil if the value doesn't exist. // The second result should be checked to determine this information. GetOk(key string) (interface{}, bool) // GetOkExists can check if TypeBool attributes that are Optional with // no Default value have been set. // // Deprecated: usage is discouraged due to undefined behaviors and may be // removed in a future version of the SDK GetOkExists(key string) (interface{}, bool) // Set sets the value for the given key. // // If the key is invalid or the value is not a correct type, an error // will be returned. Set(key string, value interface{}) error }
ResourceData generalises schema.ResourceData so that we can reuse the accessor methods defined below.
Source Files ¶
- provider.go
- resource_auth0_action.go
- resource_auth0_branding.go
- resource_auth0_client.go
- resource_auth0_client_grant.go
- resource_auth0_connection.go
- resource_auth0_custom_domain.go
- resource_auth0_email.go
- resource_auth0_email_template.go
- resource_auth0_flow.go
- resource_auth0_guardian.go
- resource_auth0_hook.go
- resource_auth0_log_stream.go
- resource_auth0_prompt.go
- resource_auth0_resource_server.go
- resource_auth0_role.go
- resource_auth0_rule.go
- resource_auth0_rule_config.go
- resource_auth0_tenant.go
- resource_auth0_user.go
- resource_data.go
- structure_auth0_connection.go
- structure_auth0_tenant.go