Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Services = map[string]string{}/* 729 elements not displayed */
Services contains the name of the AWS service that each resource type belongs to.
var Types = []string{}/* 730 elements not displayed */
Types is a list of all resource types implemented by the Terraform AWS Provider.
Functions ¶
func NewProviderPool ¶
func NewProviderPool(ctx context.Context, clientKeys []aws.ClientKey, version, installDir string, timeout time.Duration) ( map[aws.ClientKey]provider.TerraformProvider, error)
NewProviderPool launches a set of Terraform AWS Providers with the configuration of the given clientKeys (combination of AWS profile and region). Providers are launched only once in case of duplicate clientKeys.
Types ¶
type Resource ¶
type Resource struct { // Type is a resource's type as defined by the Terraform AWS Provider (e.g., aws_instance). Type string // ID is a resource's ID as defined by the Terraform AWS Provider. Depending on the resource type, the ID can be // the ARN, name (for aws_iam_role), or combined string of different attributes. The Terraform ID can differ from // what AWS defines as ID and from what ID is returned via the AWS SDK. ID string // The AWS region where a resource lives in. Region string Profile string AccountID string Tags map[string]string CreatedAt *time.Time // Provider is the Terraform Provider to update the state of a resource Provider *provider.TerraformProvider // State is the Terraform state of the resource State *cty.Value Attrs map[string]cty.Value }
func UpdateStates ¶
func UpdateStates(resources []Resource, providers map[aws.ClientKey]provider.TerraformProvider, parallel int, existingOnly bool) ([]Resource, []error)
UpdateStates updates the Terraform state for each resource via the Terraform AWS Provider. Returns only resources for which an update was successful. Errors about failed updates are returned via []error. If the existingOnly flag is true, only existing resources are returned (i.e. which state isn't of type cty.Nil after update).
func (*Resource) UpdateState ¶
UpdateState updates the state of the resource (i.e., refreshes all its attributes). If the resource is already gone, the updated state will be nil (more precisely, of type cty.NilVal).
type ResourcesThreadSafe ¶
ResourcesThreadSafe is a list implementation to store resources concurrently.
type UpdatableResource ¶
type UpdatableResource interface { Type() string ID() string State() *cty.Value UpdateState() error }
UpdatableResource implementations can update a Terraform resource's state.
func UpdateResources ¶
func UpdateResources(resources []UpdatableResource, parallel int) []UpdatableResource
UpdateResources updates the state of a given list of resources in parallel. Only updated resources are returned which still exist in AWS.