tfsdk

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2022 License: Apache-2.0 Imports: 5 Imported by: 2

Documentation

Index

Constants

View Source
const (
	KeyAssumeRole = "assume_role"
	KeyRegion     = "region"
	KeyProfile    = "profile"
)

Variables

This section is empty.

Functions

func AWSSessionFromResourceData

func AWSSessionFromResourceData(d api.Getter, opts ...SchemaOption) *session.Session

func ConfigFromResourceData

func ConfigFromResourceData(d api.Getter, opts ...SchemaOption) *sdk.Config

func GetAWSRegionAndProfile

func GetAWSRegionAndProfile(d api.Getter, opts ...SchemaOption) (string, string)

func GetAssumeRoleConfig

func GetAssumeRoleConfig(d api.Getter, opts ...SchemaOption) (config *sdk.AssumeRoleConfig)

func SchemaAssumeRole

func SchemaAssumeRole() *schema.Schema

Types

type DiffReadWrite

type DiffReadWrite struct {
	D *schema.ResourceDiff
}

func (*DiffReadWrite) Get

func (d *DiffReadWrite) Get(k string) interface{}

func (*DiffReadWrite) Id

func (d *DiffReadWrite) Id() string

func (*DiffReadWrite) List

func (d *DiffReadWrite) List(k string) []interface{}

func (*DiffReadWrite) Set

func (d *DiffReadWrite) Set(k string, v interface{}) error

func (*DiffReadWrite) SetNewComputed

func (d *DiffReadWrite) SetNewComputed(k string) error

type Resource

type Resource struct {
	*schema.ResourceData
}

func (*Resource) List

func (r *Resource) List(k string) []interface{}

type Schema

type Schema struct {
	KeyAWSRegion     string
	KeyAWSProfile    string
	KeyAWSAssumeRole string
}

func CreateSchema

func CreateSchema(opts ...SchemaOption) *Schema

func (*Schema) Apply

func (s *Schema) Apply(other *Schema)

type SchemaOption

type SchemaOption interface {
	Apply(*Schema)
}

func SchemaOptionAWSAssumeRole

func SchemaOptionAWSAssumeRole(k string) SchemaOption

func SchemaOptionAWSProfileKey

func SchemaOptionAWSProfileKey(k string) SchemaOption

func SchemaOptionAWSRegionKey

func SchemaOptionAWSRegionKey(k string) SchemaOption

func SchemaOptionFunc

func SchemaOptionFunc(f func(*Schema)) SchemaOption

Jump to

Keyboard shortcuts

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