awsverifier

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2022 License: Apache-2.0 Imports: 17 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAMIForRegion

func GetAMIForRegion(region string) string

Types

type AwsVerifier

type AwsVerifier struct {
	AwsClient *aws.Client
	Logger    ocmlog.Logger
	Output    output.Output
}

AwsVerifier holds an aws client and knows how to fuifill the VerifierSerice which contains all functions needed for verifier

func NewAwsVerifier

func NewAwsVerifier(accessID, accessSecret, sessionToken, region, profile string, debug bool) (*AwsVerifier, error)

func (*AwsVerifier) ByoVPCValidator

func (a *AwsVerifier) ByoVPCValidator(bvvi verifier.ByoVPCValidatorInput) error

Todo():

func (*AwsVerifier) CreateSecurityGroup

func (a *AwsVerifier) CreateSecurityGroup(ctx context.Context, tags map[string]string, name, vpcId string) (*ec2.CreateSecurityGroupOutput, error)

CreateSecurityGroup creates a security group with the specified name and cluster tag key in a specified VPC

func (*AwsVerifier) GetVpcIdFromSubnetId

func (a *AwsVerifier) GetVpcIdFromSubnetId(ctx context.Context, vpcSubnetID string) (string, error)

GetVpcIdFromSubnetId takes in a subnet id and returns the associated VPC id

func (*AwsVerifier) ValidateEgress

func (a *AwsVerifier) ValidateEgress(vei verifier.ValidateEgressInput) *output.Output

ValidateEgress performs validation process for egress Basic workflow is: - prepare for ec2 instance creation - create instance and wait till it gets ready, wait for userdata script execution - find unreachable endpoints & parse output, then terminate instance - return `a.output` which stores the execution results

func (*AwsVerifier) VerifyDns

func (a *AwsVerifier) VerifyDns(vdi verifier.VerifyDnsInput) *output.Output

VerifyDns performs verification process for VPC's DNS Basic workflow is: - ask AWS API for VPC attributes - ensure they're set correctly

Jump to

Keyboard shortcuts

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