tfdata

package
v2.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

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

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 NewFakeResourceData(kind string, resourceSchema map[string]*schema.Schema, values map[string]interface{}) *FakeResourceData

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)

func (*FakeResourceData) Timeout

func (d *FakeResourceData) Timeout(key string) time.Duration

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL