aws

package
v0.0.0-...-b25b198 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Package aws defines functions to connect to the AWS cloud provider

Index

Constants

View Source
const (
	// DefaultCloudFormationBootstrapUserName is the default username of boostrap user
	DefaultCloudFormationBootstrapUserName = "bootstrapper.tkg.cloud.vmware.com"
	// DefaultCloudFormationNameSuffix is the default cloudformation suffix
	DefaultCloudFormationNameSuffix = ".tkg.cloud.vmware.com"
	// DefaultCloudFormationStackName is the default cloudformtation stack name
	DefaultCloudFormationStackName = "tkg-cloud-vmware-com"
	// KeyAWSRegion is the aws region key
	KeyAWSRegion = "region"
	// KeyAWSAccessKeyID is the aws_access_key_id key
	KeyAWSAccessKeyID = "aws_access_key_id"
	// KeyAWSSecretAccessKey is the aws_secret_access_key key
	KeyAWSSecretAccessKey = "aws_secret_access_key" // #nosec
	// KeyAWSSessionToken is the aws_session_token key
	KeyAWSSessionToken = "aws_session_token" // #nosec
)

Variables

This section is empty.

Functions

func ListCredentialProfiles

func ListCredentialProfiles(filename string) ([]string, error)

ListCredentialProfiles lists the name of all profiles in the credential files

Types

type Client

type Client interface {
	VerifyAccount() error
	ListVPCs() ([]*models.Vpc, error)
	EncodeCredentials() (string, error)
	ListAvailabilityZones() ([]*models.AWSAvailabilityZone, error)
	ListRegionsByUser() ([]string, error)
	GetSubnetGatewayAssociations(vpcID string) (map[string]bool, error)
	ListSubnets(vpcID string) ([]*models.AWSSubnet, error)
	CreateCloudFormationStack() error
	CreateCloudFormationStackWithTemplate(template *bootstrap.Template) error
	GenerateBootstrapTemplate(i GenerateBootstrapTemplateInput) (*bootstrap.Template, error)
	ListInstanceTypes(optionalAZName string) ([]string, error)
	ListCloudFormationStacks() ([]string, error)
}

Client defines methods to access AWS inventory

func New

func New(creds awscreds.AWSCredentials) (Client, error)

New creates an AWS client

func NewFromEncodedCrendentials

func NewFromEncodedCrendentials(creds string) (Client, error)

NewFromEncodedCrendentials creates an AWS Client from encoded credentials

type GenerateBootstrapTemplateInput

type GenerateBootstrapTemplateInput struct {
	// BootstrapConfigFile is the path to a CAPA bootstrapv1 configuration file that can be used
	// to customize IAM policies
	BootstrapConfigFile string
	// DisableTanzuMissionControlPermissions if true will remove IAM permissions for use by Tanzu Mission Control
	// from all nodes
	DisableTanzuMissionControlPermissions bool
}

GenerateBootstrapTemplateInput is the input to the GenerateBootstrapTemplate func

Directories

Path Synopsis
Package ini is an LL(1) parser for configuration files.
Package ini is an LL(1) parser for configuration files.

Jump to

Keyboard shortcuts

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