awstag

package
v0.0.0-...-151872f Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2019 License: Apache-2.0 Imports: 96 Imported by: 0

Documentation

Overview

Copyright Jetstack Ltd. See LICENSE for details.

Copyright Jetstack Ltd. See LICENSE for details.

Copyright Jetstack Ltd. See LICENSE for details.

Copyright Jetstack Ltd. See LICENSE for details.

Copyright Jetstack Ltd. See LICENSE for details.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAccountInfo

func GetAccountInfo(iamconn *iam.IAM, stsconn *sts.STS, authProviderName string) (string, string, error)

func GetCredentials

func GetCredentials(c *Config) (*awsCredentials.Credentials, error)

This function is responsible for reading credentials from the environment in the case that they're not explicitly specified in the Terraform configuration.

func GetSupportedEC2Platforms

func GetSupportedEC2Platforms(conn *ec2.EC2) ([]string, error)

func Provider

func Provider() terraform.ResourceProvider

Provider returns a terraform.ResourceProvider.

Types

type AWSClient

type AWSClient struct {
	// contains filtered or unexported fields
}

func (*AWSClient) DynamoDB

func (c *AWSClient) DynamoDB() *dynamodb.DynamoDB

func (*AWSClient) IsChinaCloud

func (c *AWSClient) IsChinaCloud() bool

func (*AWSClient) IsGovCloud

func (c *AWSClient) IsGovCloud() bool

func (*AWSClient) S3

func (c *AWSClient) S3() *s3.S3

type Config

type Config struct {
	AccessKey     string
	SecretKey     string
	CredsFilename string
	Profile       string
	Token         string
	Region        string
	MaxRetries    int

	AssumeRoleARN         string
	AssumeRoleExternalID  string
	AssumeRoleSessionName string
	AssumeRolePolicy      string

	AllowedAccountIds   []interface{}
	ForbiddenAccountIds []interface{}

	AcmEndpoint              string
	ApigatewayEndpoint       string
	CloudFormationEndpoint   string
	CloudWatchEndpoint       string
	CloudWatchEventsEndpoint string
	CloudWatchLogsEndpoint   string
	DynamoDBEndpoint         string
	DeviceFarmEndpoint       string
	Ec2Endpoint              string
	EcsEndpoint              string
	EcrEndpoint              string
	ElbEndpoint              string
	IamEndpoint              string
	KinesisEndpoint          string
	KmsEndpoint              string
	LambdaEndpoint           string
	RdsEndpoint              string
	R53Endpoint              string
	S3Endpoint               string
	SnsEndpoint              string
	SqsEndpoint              string
	StsEndpoint              string
	Insecure                 bool

	SkipCredsValidation     bool
	SkipGetEC2Platforms     bool
	SkipRegionValidation    bool
	SkipRequestingAccountId bool
	SkipMetadataApiCheck    bool
	S3ForcePathStyle        bool
}

func (*Config) Client

func (c *Config) Client() (interface{}, error)

Client configures and returns a fully initialized AWSClient

func (*Config) ValidateAccountId

func (c *Config) ValidateAccountId(accountId string) error

ValidateAccountId returns a context-specific error if the configured account id is explicitly forbidden or not authorised; and nil if it is authorised.

func (*Config) ValidateCredentials

func (c *Config) ValidateCredentials(stsconn *sts.STS) error

Validate credentials early and fail before we do any graph walking.

func (*Config) ValidateRegion

func (c *Config) ValidateRegion() error

ValidateRegion returns an error if the configured region is not a valid aws region and nil otherwise.

Jump to

Keyboard shortcuts

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