aws

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2021 License: Apache-2.0 Imports: 47 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TFStateBucket       = terraform.Var{Name: "state_bucket", TemplateOnly: true}
	TFStateBucketRegion = terraform.Var{Name: "state_bucket_region", TemplateOnly: true}
	TFRegion            = terraform.Var{Name: "region"}

	// vpc & cluster
	TFVPCCidr          = terraform.Var{Name: "vpc_cidr"}
	TFEnableIPv6       = terraform.Var{Name: "enable_ipv6", CreationOnly: true}
	TFAZSuffixes       = terraform.Var{Name: "az_suffixes", CreationOnly: true}
	TFTopology         = terraform.Var{Name: "topology"}
	TFCluster          = terraform.Var{Name: "cluster"}
	TFKubeVersion      = terraform.Var{Name: "kube_version", CreationOnly: true}
	TFSecurityGroupIds = terraform.Var{Name: "security_group_ids", CreationOnly: true}
	TFVPCId            = terraform.Var{Name: "vpc_id", CreationOnly: true}
	TFAdminGroups      = terraform.Var{Name: "admin_groups", CreationOnly: true}

	// linked accounts
	TFAccount  = terraform.Var{Name: "account"}
	TFTargets  = terraform.Var{Name: "targets", CreationOnly: true}
	TFPolicies = terraform.Var{Name: "policies", CreationOnly: true}
	TFOIDCUrl  = terraform.Var{Name: "oidc_url", CreationOnly: true}
	TFOIDCArn  = terraform.Var{Name: "oidc_arn", CreationOnly: true}
)

Functions

func NewEKSClusterTFAction

func NewEKSClusterTFAction(values terraform.Values, opts ...terraform.Option) (a *terraform.Action, err error)

func NewLinkedAccountTFAction

func NewLinkedAccountTFAction(values terraform.Values, opts ...terraform.Option) (a *terraform.Action, err error)

func NewVPCTFAction

func NewVPCTFAction(values terraform.Values, zones []string, opts ...terraform.Option) (a *terraform.Action, err error)

func ParseLinkedAccountOutput

func ParseLinkedAccountOutput(data []byte) (roleArn string, err error)

Types

type AWSManager

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

func NewAWSManager

func NewAWSManager(region string) *AWSManager

func (*AWSManager) ActivateCluster

func (a *AWSManager) ActivateCluster(cc *v1alpha1.ClusterConfig) error

func (*AWSManager) CertificateProvider

func (a *AWSManager) CertificateProvider() cloud.CertificateProvider

func (*AWSManager) CheckCreatePermissions

func (a *AWSManager) CheckCreatePermissions() error

func (*AWSManager) CheckDestroyPermissions

func (a *AWSManager) CheckDestroyPermissions() error

func (*AWSManager) Cloud

func (a *AWSManager) Cloud() string

func (*AWSManager) CreateCluster

func (a *AWSManager) CreateCluster(cc *v1alpha1.ClusterConfig) error

func (*AWSManager) CreateNodepool

func (a *AWSManager) CreateNodepool(cc *v1alpha1.ClusterConfig, np *v1alpha1.Nodepool) error

func (*AWSManager) DeleteCluster

func (a *AWSManager) DeleteCluster(cluster string) error

func (*AWSManager) DeleteLinkedServiceAccount

func (a *AWSManager) DeleteLinkedServiceAccount(cluster string, lsa *v1alpha1.LinkedServiceAccount) error

func (*AWSManager) DeleteNodepool

func (a *AWSManager) DeleteNodepool(cluster string, nodepool string) error

func (*AWSManager) DestroyVPC

func (a *AWSManager) DestroyVPC(vpcId string) error

func (*AWSManager) KubernetesProvider

func (a *AWSManager) KubernetesProvider() cloud.KubernetesProvider

func (*AWSManager) Region

func (a *AWSManager) Region() string

func (*AWSManager) String

func (a *AWSManager) String() string

func (*AWSManager) SyncLinkedServiceAccount

func (a *AWSManager) SyncLinkedServiceAccount(cluster string, lsa *v1alpha1.LinkedServiceAccount) error

func (*AWSManager) VPCProvider

func (a *AWSManager) VPCProvider() cloud.VPCProvider

type AWSProvider

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

func NewAWSProvider

func NewAWSProvider() *AWSProvider

func (*AWSProvider) GetComponents

func (a *AWSProvider) GetComponents() []components.ComponentInstaller

func (*AWSProvider) ID

func (a *AWSProvider) ID() string

func (*AWSProvider) IsSetup

func (a *AWSProvider) IsSetup() bool

func (*AWSProvider) Setup

func (a *AWSProvider) Setup() error

func (*AWSProvider) String

func (a *AWSProvider) String() string

type IAMRoleMapping

type IAMRoleMapping struct {
	Groups   []string `yaml:"groups"`
	RoleArn  string   `yaml:"rolearn"`
	Username string   `yaml:"username"`
}

type IAMRoleMappingList

type IAMRoleMappingList []*IAMRoleMapping

func ParseRoleMappingList

func ParseRoleMappingList(content string) (rms IAMRoleMappingList, err error)

func (IAMRoleMappingList) GetRole

func (l IAMRoleMappingList) GetRole(role string) *IAMRoleMapping

func (IAMRoleMappingList) HasRole

func (l IAMRoleMappingList) HasRole(role string) bool

type ObjContainer

type ObjContainer struct {
	Type  string
	Value interface{}
}

type PromptConfigGenerator

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

generates AWS cluster & nodepool based on prompts to the user

func NewPromptConfigGenerator

func NewPromptConfigGenerator(region string, credentials config.AWSCredentials) (*PromptConfigGenerator, error)

func (*PromptConfigGenerator) CreateClusterConfig

func (g *PromptConfigGenerator) CreateClusterConfig() (cc *v1alpha1.ClusterConfig, err error)

func (*PromptConfigGenerator) CreateNodepoolConfig

func (g *PromptConfigGenerator) CreateNodepoolConfig(cc *v1alpha1.ClusterConfig) (np *v1alpha1.Nodepool, err error)

type TFClusterOutput

type TFClusterOutput struct {
	ClusterName       string
	AlbIngressRoleArn string
	NodeRoleArn       string
	AdminRoleArn      string
}

func ParseClusterTFOutput

func ParseClusterTFOutput(data []byte) (tf *TFClusterOutput, err error)

type TFSubnet

type TFSubnet struct {
	Id                         string `json:"id"`
	Arn                        string `json:"arn"`
	AssignIpv6OnCreation       bool   `json:"assign_ipv6_address_on_creation"`
	AvailabilityZone           string `json:"availability_zone"`
	AvailabilityZoneId         string `json:"availability_zone_id"`
	CidrBlock                  string `json:"cidr_block"`
	Ipv6CidrBlock              string `json:"ipv6_cidr_block"`
	Ipv6CidrBlockAssociationId string `json:"ipv6_cidr_block_association_id"`
	MapPublicIpOnLaunch        bool   `json:"map_public_ip_on_launch"`
	VpcId                      string `json:"vpc_id"`
}

type TFVPCOutput

type TFVPCOutput struct {
	VpcId              string      `json:"vpc_id"`
	Ipv6Cidr           string      `json:"ipv6_cidr"`
	MainRouteTable     string      `json:"main_route_table"`
	PublicSubnets      []*TFSubnet `json:"public_subnets"`
	PublicGateway      string      `json:"public_gateway"`
	PrivateSubnets     []*TFSubnet `json:"private_subnets"`
	PrivateRouteTables []string    `json:"private_route_tables"`
}

func ParseVPCTFOutput

func ParseVPCTFOutput(data []byte) (tf *TFVPCOutput, err error)

Jump to

Keyboard shortcuts

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