resource

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2021 License: MIT Imports: 19 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var IDs = map[string]string{}/* 469 elements not displayed */

IDs stores the name of the struct field of the AWS API used as ID for each Terraform resource type.

View Source
var Services = map[string]string{}/* 729 elements not displayed */

Services contains the name of the AWS service that each resource type belongs to.

View Source
var SupportedTypes = []string{}/* 297 elements not displayed */

SupportedTypes is a list of all resource types currently supported by awsls.

View Source
var Types = []string{}/* 730 elements not displayed */

Types is a list of all resource types implemented by the Terraform AWS Provider.

View Source
var TypesWithTags = []string{}/* 345 elements not displayed */

TypesWithTags is a list of all resource types that support tags.

Functions

func GetAttribute

func GetAttribute(name string, r *terraform.Resource) (string, error)

GetAttribute returns any Terraform attribute of a resource by name.

func HasAttributes

func HasAttributes(attributes []string, terraformType string, provider *provider.TerraformProvider) (map[string]bool, error)

HasAttributes returns only the attributes that the given Terraform resource type supports out of a given list of attributes.

func IsSupportedType

func IsSupportedType(s string) bool

IsSupportedType returns true if the given string is an awsls supported resource type.

func IsType

func IsType(s string) bool

IsType returns true if the given string is a Terraform AWS resource type.

func MatchSupportedTypes

func MatchSupportedTypes(globPattern string) ([]string, error)

MatchResourceTypes returns all by awsls supported resource types that match the given glob pattern.

func PrintResources added in v0.8.2

func PrintResources(resources []terraform.Resource, hasAttrs map[string]bool, attributes []string)

func PrintResourcesAsJSON added in v0.10.0

func PrintResourcesAsJSON(resources []terraform.Resource, hasAttrs map[string]bool, attributes []string)

func SupportsTags

func SupportsTags(s string) bool

SupportsTags returns true if the given resource type supports tags.

Types

type UpdatedResources added in v0.8.2

type UpdatedResources struct {
	Resources []terraform.Resource
	Errors    []error
}

UpdatedResources contains resources which Terraform state has been updated. Failed updates are logged in the Errors array.

func ListInMultipleAccountsAndRegions added in v0.8.2

func ListInMultipleAccountsAndRegions(ctx context.Context, rType string, hasAttrs map[string]bool,
	clients map[aws.ClientKey]aws.Client, providers map[aws.ClientKey]provider.TerraformProvider) UpdatedResources

ListInMultipleAccountsAndRegions lists resources of a given resource type in parallel for multiple accounts and regions and updates the resources' Terraform state.

Jump to

Keyboard shortcuts

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