attrmap

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2023 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AttributeMap

type AttributeMap map[string]attributeInfo

func New

func New(attrMap map[string]string, schemaMap map[string]*schema.Schema) AttributeMap

New returns a new AttributeMap from the specified Terraform resource attribute name to AWS API attribute name map and resource schema.

func (AttributeMap) APIAttributeNames

func (m AttributeMap) APIAttributeNames() []string

APIAttributeNames returns the AWS API attribute names.

func (AttributeMap) APIAttributesToResourceData

func (m AttributeMap) APIAttributesToResourceData(apiAttributes map[string]string, d *schema.ResourceData) error

APIAttributesToResourceData sets Terraform ResourceData from a map of AWS API attributes.

func (AttributeMap) ResourceDataToAPIAttributesCreate

func (m AttributeMap) ResourceDataToAPIAttributesCreate(d *schema.ResourceData) (map[string]string, error)

ResourceDataToAPIAttributesCreate returns a map of AWS API attributes from Terraform ResourceData. The API attributes map is suitable for resource create.

func (AttributeMap) ResourceDataToAPIAttributesUpdate

func (m AttributeMap) ResourceDataToAPIAttributesUpdate(d *schema.ResourceData) (map[string]string, error)

ResourceDataToAPIAttributesUpdate returns a map of AWS API attributes from Terraform ResourceData. The API attributes map is suitable for resource update.

func (AttributeMap) WithAlwaysSendConfiguredBooleanValueOnCreate

func (m AttributeMap) WithAlwaysSendConfiguredBooleanValueOnCreate(tfAttributeName string) AttributeMap

WithAlwaysSendConfiguredBooleanValueOnCreate marks the specified Terraform Boolean attribute as always having any configured value sent on resource create. By default a Boolean value is only sent to the API on resource create if its configured value is true. This method is intended to be chained with other similar helper methods in a builder pattern.

func (AttributeMap) WithIAMPolicyAttribute

func (m AttributeMap) WithIAMPolicyAttribute(tfAttributeName string) AttributeMap

WithIAMPolicyAttribute marks the specified Terraform attribute as holding an AWS IAM policy. AWS IAM policies get special handling. This method is intended to be chained with other similar helper methods in a builder pattern.

func (AttributeMap) WithMissingSetToNil

func (m AttributeMap) WithMissingSetToNil(tfAttributeName string) AttributeMap

WithMissingSetToNil marks the specified Terraform attribute as being set to nil if it's missing after reading the API. An attribute name of "*" means all attributes get marked. This method is intended to be chained with other similar helper methods in a builder pattern.

func (AttributeMap) WithSkipUpdate

func (m AttributeMap) WithSkipUpdate(tfAttributeName string) AttributeMap

WithSkipUpdate marks the specified Terraform attribute as skipping update handling. This method is intended to be chained with other similar helper methods in a builder pattern.

Jump to

Keyboard shortcuts

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