aws

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2020 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//Constant Value
	ALREADY_EXISTS   = 2
	NEWLY_CREATED    = 1
	CREATION_FAILURE = 0

	//OPEN_ID_CA_FINGERPRINT
	CA_FINGERPRINT   = "9e99a48a9960b14926bb7f3b02e22da2b0ab7280"
	CONFIG_FILE_PATH = utils.HomeDir() + "/.kubenx/config"
)

Functions

func AssumeRole

func AssumeRole(arn string, session_name string) *sts.Credentials

Create STS Assume Role

func CreateOpenIDConnector

func CreateOpenIDConnector(svc *iam.IAM, issuerUrl *string) (int, error)

Create Open ID Connector

func GetClusterInfo

func GetClusterInfo(svc *eks.EKS, cluster string) (*eks.DescribeClusterOutput, error)

Get Cluster Information with session

func GetEC2Session

func GetEC2Session(role *string) *ec2.EC2

Get EC2 Session

func GetEksSession

func GetEksSession(role *string) *eks.EKS

Get EKS Session

func GetIAMSession

func GetIAMSession(role *string) *iam.IAM

func GetSubnetListInVPC

func GetSubnetListInVPC(svc *ec2.EC2, vpcId *string) (*ec2.DescribeSubnetsOutput, error)

Get all subnet list in vpc

func GetSubnetsInfo

func GetSubnetsInfo(svc *ec2.EC2, subnetIds []*string) (*ec2.DescribeSubnetsOutput, error)

Describe subnet subnet Information

func GetVPCInfo

func GetVPCInfo(svc *ec2.EC2, vpcId *string) (*ec2.DescribeVpcsOutput, error)

Describe Single VPC Information

func ResetAWSEnvironmentVariable

func ResetAWSEnvironmentVariable()

func UpdateSubnetsTagForCluster

func UpdateSubnetsTagForCluster(svc *ec2.EC2, subnets []*string, cluster string, subnetType string) error

Update Subnet Tag for cluster

func UpdateVPCTagForCluster

func UpdateVPCTagForCluster(svc *ec2.EC2, vpcId *string, cluster string) error

Update VPC Tag for cluster

Types

type KubenxAussmeConfig

type KubenxAussmeConfig struct {
	SessionName      string            `json:"session_name"`
	Assume           map[string]string `json:"assume"`
	EKSAssumeMapping map[string]string `json:"eks-assume-mapping"`
}

func FindEKSAussmeInfo

func FindEKSAussmeInfo() (KubenxAussmeConfig, error)

Find Assume role mapping information

Jump to

Keyboard shortcuts

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