Documentation
¶
Overview ¶
In order to interact with resource converters, we need to be able to create "terraform resource data" that supports a very limited subset of the API actually used during the conversion process.
Index ¶
- type FakeResourceData
- func (d *FakeResourceData) Get(name string) interface{}
- func (d *FakeResourceData) GetOk(name string) (interface{}, bool)
- func (d *FakeResourceData) GetOkExists(key string) (interface{}, bool)
- func (d *FakeResourceData) GetProviderMeta(interface{}) error
- func (d *FakeResourceData) HasChange(string) bool
- func (d *FakeResourceData) Id() string
- func (d *FakeResourceData) Kind() string
- func (d *FakeResourceData) Set(string, interface{}) error
- func (d *FakeResourceData) SetId(string)
- func (d *FakeResourceData) Timeout(key string) time.Duration
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeResourceData ¶
type FakeResourceData struct {
// contains filtered or unexported fields
}
Compare to https://github.com/hashicorp/terraform-plugin-sdk/blob/97b4465/helper/schema/resource_data.go#L15
func NewFakeResourceData ¶
func (*FakeResourceData) Get ¶
func (d *FakeResourceData) Get(name string) interface{}
Get reads a single field by key.
func (*FakeResourceData) GetOk ¶
func (d *FakeResourceData) GetOk(name string) (interface{}, bool)
Get reads a single field by key and returns a boolean indicating whether the field exists.
func (*FakeResourceData) GetOkExists ¶
func (d *FakeResourceData) GetOkExists(key string) (interface{}, bool)
func (*FakeResourceData) GetProviderMeta ¶
func (d *FakeResourceData) GetProviderMeta(interface{}) error
func (*FakeResourceData) HasChange ¶
func (d *FakeResourceData) HasChange(string) bool
These methods are required by some mappers but we don't actually have (or need) implementations for them.
func (*FakeResourceData) Id ¶
func (d *FakeResourceData) Id() string
Id returns the ID of the resource from state.
func (*FakeResourceData) Kind ¶
func (d *FakeResourceData) Kind() string
Kind returns the type of resource (i.e. "google_storage_bucket").
func (*FakeResourceData) Set ¶
func (d *FakeResourceData) Set(string, interface{}) error
func (*FakeResourceData) SetId ¶
func (d *FakeResourceData) SetId(string)