aws

package
v0.53.2-rc.18 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2026 License: Apache-2.0 Imports: 15 Imported by: 3

Documentation

Overview

Package aws provides AWS resource definitions and environment configuration for e2e tests.

Index

Constants

View Source
const (

	// DDInfraDefaultVPCIDParamName is the parameter name for the default VPC ID.
	DDInfraDefaultVPCIDParamName = "aws/defaultVPCID"
	// DDInfraDefaultSubnetsParamName is the parameter name for the default subnets.
	DDInfraDefaultSubnetsParamName = "aws/defaultSubnets"
	// DDInfraDefaultSecurityGroupsParamName is the parameter name for the default security groups.
	DDInfraDefaultSecurityGroupsParamName = "aws/defaultSecurityGroups"
	// DDInfraDefaultInstanceTypeParamName is the parameter name for the default instance type.
	DDInfraDefaultInstanceTypeParamName = "aws/defaultInstanceType"
	// DDInfraDefaultInstanceProfileParamName is the parameter name for the default instance profile.
	DDInfraDefaultInstanceProfileParamName = "aws/defaultInstanceProfile"
	// DDInfraDefaultARMInstanceTypeParamName is the parameter name for the default ARM instance type.
	DDInfraDefaultARMInstanceTypeParamName = "aws/defaultARMInstanceType"
	// DDInfraDefaultWindowsInstanceTypeParamName is the parameter name for the default Windows instance type.
	DDInfraDefaultWindowsInstanceTypeParamName = "aws/defaultWindowsInstanceType"
	// DDInfraDefaultKeyPairParamName is the parameter name for the default key pair.
	DDInfraDefaultKeyPairParamName = "aws/defaultKeyPairName"
	// DDinfraDefaultPublicKeyPath is the parameter name for the default public key path.
	DDinfraDefaultPublicKeyPath = "aws/defaultPublicKeyPath"
	// DDInfraDefaultPrivateKeyPath is the parameter name for the default private key path.
	DDInfraDefaultPrivateKeyPath = "aws/defaultPrivateKeyPath"
	// DDInfraDefaultPrivateKeyPassword is the parameter name for the default private key password.
	DDInfraDefaultPrivateKeyPassword = "aws/defaultPrivateKeyPassword"
	// DDInfraDefaultInstanceStorageSize is the parameter name for the default instance storage size.
	DDInfraDefaultInstanceStorageSize = "aws/defaultInstanceStorageSize"
	// DDInfraDefaultShutdownBehavior is the parameter name for the default shutdown behavior.
	DDInfraDefaultShutdownBehavior = "aws/defaultShutdownBehavior"
	// DDInfraDefaultInternalRegistry is the parameter name for the default internal registry.
	DDInfraDefaultInternalRegistry = "aws/defaultInternalRegistry"
	// DDInfraDefaultInternalDockerhubMirror is the parameter name for the default internal Docker Hub mirror.
	DDInfraDefaultInternalDockerhubMirror = "aws/defaultInternalDockerhubMirror"
	// DDInfraUseMacosCompatibleSubnets is the parameter name for macOS-compatible subnets.
	DDInfraUseMacosCompatibleSubnets = "aws/useMacosCompatibleSubnets"

	// DDInfraEcsExecKMSKeyID is the parameter name for the ECS exec KMS key ID.
	DDInfraEcsExecKMSKeyID = "aws/ecs/execKMSKeyID"
	// DDInfraEcsFargateFakeintakeClusterArns is the parameter name for the ECS Fargate fakeintake cluster ARNs.
	DDInfraEcsFargateFakeintakeClusterArns = "aws/ecs/fargateFakeintakeClusterArns"
	// DDInfraEcsFakeintakeLBs is the parameter name for the ECS fakeintake load balancers.
	DDInfraEcsFakeintakeLBs = "aws/ecs/defaultfakeintakeLBs"
	// DDInfraEcsTaskExecutionRole is the parameter name for the ECS task execution role.
	DDInfraEcsTaskExecutionRole = "aws/ecs/taskExecutionRole"
	// DDInfraEcsTaskRole is the parameter name for the ECS task role.
	DDInfraEcsTaskRole = "aws/ecs/taskRole"
	// DDInfraEcsInstanceProfile is the parameter name for the ECS instance profile.
	DDInfraEcsInstanceProfile = "aws/ecs/instanceProfile"
	// DDInfraEcsServiceAllocatePublicIP is the parameter name for allocating public IP to ECS services.
	DDInfraEcsServiceAllocatePublicIP = "aws/ecs/serviceAllocatePublicIP"
	// DDInfraEcsFargateCapacityProvider is the parameter name for the ECS Fargate capacity provider.
	DDInfraEcsFargateCapacityProvider = "aws/ecs/fargateCapacityProvider"
	// DDInfraEcsLinuxECSOptimizedNodeGroup is the parameter name for the Linux ECS-optimized node group.
	DDInfraEcsLinuxECSOptimizedNodeGroup = "aws/ecs/linuxECSOptimizedNodeGroup"
	// DDInfraEcsLinuxECSOptimizedARMNodeGroup is the parameter name for the Linux ECS-optimized ARM node group.
	DDInfraEcsLinuxECSOptimizedARMNodeGroup = "aws/ecs/linuxECSOptimizedARMNodeGroup"
	// DDInfraEcsLinuxBottlerocketNodeGroup is the parameter name for the Linux Bottlerocket node group.
	DDInfraEcsLinuxBottlerocketNodeGroup = "aws/ecs/linuxBottlerocketNodeGroup"
	// DDInfraEcsWindowsLTSCNodeGroup is the parameter name for the Windows LTSC node group.
	DDInfraEcsWindowsLTSCNodeGroup = "aws/ecs/windowsLTSCNodeGroup"

	// DDInfraEKSPODSubnets is the parameter name for EKS pod subnets.
	DDInfraEKSPODSubnets = "aws/eks/podSubnets"
	// DDInfraEksAllowedInboundSecurityGroups is the parameter name for EKS allowed inbound security groups.
	DDInfraEksAllowedInboundSecurityGroups = "aws/eks/inboundSecurityGroups"
	// DDInfraEksAllowedInboundPrefixList is the parameter name for EKS allowed inbound prefix lists.
	DDInfraEksAllowedInboundPrefixList = "aws/eks/inboundPrefixLists"
	// DDInfraEksAllowedInboundManagedPrefixListNames is the parameter name for EKS managed prefix list names.
	DDInfraEksAllowedInboundManagedPrefixListNames = "aws/eks/inboundManagedPrefixListNames"
	// DDInfraEksFargateNamespace is the parameter name for the EKS Fargate namespace.
	DDInfraEksFargateNamespace = "aws/eks/fargateNamespace"
	// DDInfraEksLinuxNodeGroup is the parameter name for the EKS Linux node group.
	DDInfraEksLinuxNodeGroup = "aws/eks/linuxNodeGroup"
	// DDInfraEksLinuxARMNodeGroup is the parameter name for the EKS Linux ARM node group.
	DDInfraEksLinuxARMNodeGroup = "aws/eks/linuxARMNodeGroup"
	// DDInfraEksLinuxBottlerocketNodeGroup is the parameter name for the EKS Linux Bottlerocket node group.
	DDInfraEksLinuxBottlerocketNodeGroup = "aws/eks/linuxBottlerocketNodeGroup"
	// DDInfraEksWindowsNodeGroup is the parameter name for the EKS Windows node group.
	DDInfraEksWindowsNodeGroup = "aws/eks/windowsNodeGroup"
	// DDInfraEksAccountAdminSSORole is the parameter name for the EKS account admin SSO role.
	DDInfraEksAccountAdminSSORole = "aws/eks/accountAdminSSORole"
	// DDInfraEksReadOnlySSORole is the parameter name for the EKS read-only SSO role.
	DDInfraEksReadOnlySSORole = "aws/eks/readOnlySSORole"
)

Variables

View Source
var (
	EnabledString  = pulumi.String("ENABLED")
	DisabledString = pulumi.String("DISABLED")
)

Pulumi string constants for enabled/disabled states.

Functions

func GetAMI

func GetAMI(descriptor *e2eos.Descriptor) (string, error)

GetAMI returns the AMI ID for the given OS descriptor from the hardcoded platforms map.

func WithCommonEnvironment

func WithCommonEnvironment(e *config.CommonEnvironment) func(*Environment)

WithCommonEnvironment sets the common environment for the AWS environment.

Types

type DDInfraEKSPodSubnets

type DDInfraEKSPodSubnets struct {
	AZ       string `json:"az"`
	SubnetID string `json:"subnet"`
}

DDInfraEKSPodSubnets defines a pod subnet for EKS clusters.

type Environment

type Environment struct {
	*config.CommonEnvironment

	Namer namer.Namer
	// contains filtered or unexported fields
}

Environment represents an AWS environment configuration for e2e tests.

func NewEnvironment

func NewEnvironment(ctx *pulumi.Context, options ...func(*Environment)) (Environment, error)

NewEnvironment creates a new AWS environment with the given Pulumi context and options.

func (*Environment) DefaultARMInstanceType

func (e *Environment) DefaultARMInstanceType() string

DefaultARMInstanceType returns the default ARM64 EC2 instance type.

func (*Environment) DefaultFakeintakeECSArns

func (e *Environment) DefaultFakeintakeECSArns() []string

DefaultFakeintakeECSArns returns the default fakeintake ECS cluster ARNs.

func (*Environment) DefaultFakeintakeLBs

func (e *Environment) DefaultFakeintakeLBs() []FakeintakeLBConfig

DefaultFakeintakeLBs returns the default fakeintake load balancer configurations.

func (*Environment) DefaultInstanceProfileName

func (e *Environment) DefaultInstanceProfileName() string

DefaultInstanceProfileName returns the default IAM instance profile name.

func (*Environment) DefaultInstanceStorageSize

func (e *Environment) DefaultInstanceStorageSize() int

DefaultInstanceStorageSize returns the default instance storage size in GB.

func (*Environment) DefaultInstanceType

func (e *Environment) DefaultInstanceType() string

DefaultInstanceType returns the default EC2 instance type.

func (*Environment) DefaultKeyPairName

func (e *Environment) DefaultKeyPairName() string

DefaultKeyPairName returns the default SSH key pair name.

func (*Environment) DefaultPrivateKeyPassword

func (e *Environment) DefaultPrivateKeyPassword() string

DefaultPrivateKeyPassword returns the password for the default SSH private key.

func (*Environment) DefaultPrivateKeyPath

func (e *Environment) DefaultPrivateKeyPath() string

DefaultPrivateKeyPath returns the path to the default SSH private key.

func (*Environment) DefaultPublicKeyPath

func (e *Environment) DefaultPublicKeyPath() string

DefaultPublicKeyPath returns the path to the default SSH public key.

func (*Environment) DefaultSecurityGroups

func (e *Environment) DefaultSecurityGroups() []string

DefaultSecurityGroups returns the default security group IDs.

func (*Environment) DefaultShutdownBehavior

func (e *Environment) DefaultShutdownBehavior() string

DefaultShutdownBehavior returns the default shutdown behavior ('terminate' or 'stop').

func (*Environment) DefaultSubnets

func (e *Environment) DefaultSubnets() []string

DefaultSubnets returns the default subnet IDs.

func (*Environment) DefaultVPCID

func (e *Environment) DefaultVPCID() string

DefaultVPCID returns the default VPC ID.

func (*Environment) DefaultWindowsInstanceType added in v0.77.0

func (e *Environment) DefaultWindowsInstanceType() string

DefaultWindowsInstanceType returns the default Windows EC2 instance type.

func (*Environment) ECSExecKMSKeyID

func (e *Environment) ECSExecKMSKeyID() string

ECSExecKMSKeyID returns the KMS key ID used for ECS exec.

func (*Environment) ECSFakeintakeLBBaseHost

func (e *Environment) ECSFakeintakeLBBaseHost() pulumi.StringOutput

ECSFakeintakeLBBaseHost returns a random fakeintake load balancer base host.

func (*Environment) ECSFakeintakeLBListenerArn

func (e *Environment) ECSFakeintakeLBListenerArn() pulumi.StringOutput

ECSFakeintakeLBListenerArn returns a random fakeintake load balancer listener ARN.

func (*Environment) ECSFargateCapacityProvider

func (e *Environment) ECSFargateCapacityProvider() bool

ECSFargateCapacityProvider returns whether the Fargate capacity provider is enabled.

func (*Environment) ECSFargateFakeintakeClusterArn

func (e *Environment) ECSFargateFakeintakeClusterArn() pulumi.StringOutput

ECSFargateFakeintakeClusterArn returns a random fakeintake ECS cluster ARN.

func (*Environment) ECSInstanceProfile

func (e *Environment) ECSInstanceProfile() string

ECSInstanceProfile returns the ECS instance profile ARN.

func (*Environment) ECSLinuxBottlerocketNodeGroup

func (e *Environment) ECSLinuxBottlerocketNodeGroup() bool

ECSLinuxBottlerocketNodeGroup returns whether the Linux Bottlerocket node group is enabled.

func (*Environment) ECSLinuxECSOptimizedARMNodeGroup

func (e *Environment) ECSLinuxECSOptimizedARMNodeGroup() bool

ECSLinuxECSOptimizedARMNodeGroup returns whether the Linux ECS-optimized ARM node group is enabled.

func (*Environment) ECSLinuxECSOptimizedNodeGroup

func (e *Environment) ECSLinuxECSOptimizedNodeGroup() bool

ECSLinuxECSOptimizedNodeGroup returns whether the Linux ECS-optimized node group is enabled.

func (*Environment) ECSServicePublicIP

func (e *Environment) ECSServicePublicIP() bool

ECSServicePublicIP returns whether ECS services should allocate public IPs.

func (*Environment) ECSTaskExecutionRole

func (e *Environment) ECSTaskExecutionRole() string

ECSTaskExecutionRole returns the ECS task execution role ARN.

func (*Environment) ECSTaskRole

func (e *Environment) ECSTaskRole() string

ECSTaskRole returns the ECS task role ARN.

func (*Environment) ECSWindowsNodeGroup

func (e *Environment) ECSWindowsNodeGroup() bool

ECSWindowsNodeGroup returns whether the Windows LTSC node group is enabled.

func (*Environment) EKSAccountAdminSSORole

func (e *Environment) EKSAccountAdminSSORole() string

EKSAccountAdminSSORole returns the EKS account admin SSO role ARN.

func (*Environment) EKSAllowedInboundManagedPrefixListNames

func (e *Environment) EKSAllowedInboundManagedPrefixListNames() []string

EKSAllowedInboundManagedPrefixListNames returns the allowed inbound managed prefix list names for EKS.

func (*Environment) EKSAllowedInboundPrefixLists

func (e *Environment) EKSAllowedInboundPrefixLists() []string

EKSAllowedInboundPrefixLists returns the allowed inbound prefix lists for EKS.

func (*Environment) EKSAllowedInboundSecurityGroups

func (e *Environment) EKSAllowedInboundSecurityGroups() []string

EKSAllowedInboundSecurityGroups returns the allowed inbound security groups for EKS.

func (*Environment) EKSBottlerocketNodeGroup

func (e *Environment) EKSBottlerocketNodeGroup() bool

EKSBottlerocketNodeGroup returns whether the EKS Bottlerocket node group is enabled.

func (*Environment) EKSFargateNamespace

func (e *Environment) EKSFargateNamespace() string

EKSFargateNamespace returns the EKS Fargate namespace.

func (*Environment) EKSLinuxARMNodeGroup

func (e *Environment) EKSLinuxARMNodeGroup() bool

EKSLinuxARMNodeGroup returns whether the EKS Linux ARM node group is enabled.

func (*Environment) EKSLinuxNodeGroup

func (e *Environment) EKSLinuxNodeGroup() bool

EKSLinuxNodeGroup returns whether the EKS Linux node group is enabled.

func (*Environment) EKSPODSubnets

func (e *Environment) EKSPODSubnets() []DDInfraEKSPodSubnets

EKSPODSubnets returns the EKS pod subnet configurations.

func (*Environment) EKSReadOnlySSORole

func (e *Environment) EKSReadOnlySSORole() string

EKSReadOnlySSORole returns the EKS read-only SSO role ARN.

func (*Environment) EKSWindowsNodeGroup

func (e *Environment) EKSWindowsNodeGroup() bool

EKSWindowsNodeGroup returns whether the EKS Windows node group is enabled.

func (*Environment) GetCommonEnvironment

func (e *Environment) GetCommonEnvironment() *config.CommonEnvironment

GetCommonEnvironment returns the underlying common environment.

func (*Environment) InternalDockerhubMirror

func (e *Environment) InternalDockerhubMirror() string

InternalDockerhubMirror returns the internal Docker Hub mirror URL.

func (*Environment) InternalRegistry

func (e *Environment) InternalRegistry() string

InternalRegistry returns the internal container registry URL.

func (*Environment) InternalRegistryFullImagePathExists

func (e *Environment) InternalRegistryFullImagePathExists(fullImagePath string) (bool, error)

InternalRegistryFullImagePathExists checks if a full image path exists in the internal registry.

func (*Environment) InternalRegistryImageTagExists

func (e *Environment) InternalRegistryImageTagExists(image, tag string) (bool, error)

InternalRegistryImageTagExists checks if the image exists in the internal registry.

func (*Environment) Profile

func (e *Environment) Profile() string

Profile returns the AWS profile name.

func (*Environment) RandomSubnets

func (e *Environment) RandomSubnets() pulumi.StringArrayOutput

RandomSubnets returns a randomly shuffled subset of the default subnets.

func (*Environment) Region

func (e *Environment) Region() string

Region returns the AWS region.

func (*Environment) UseMacosCompatibleSubnets

func (e *Environment) UseMacosCompatibleSubnets() bool

UseMacosCompatibleSubnets returns whether to use macOS-compatible subnets.

type FakeintakeLBConfig

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

FakeintakeLBConfig defines the configuration for a fakeintake load balancer.

type PlatformsAMIsType

type PlatformsAMIsType = map[string]string

PlatformsAMIsType maps version to AMI ID (e.g. map["22.04"] = "ami-01234567890123456").

type PlatformsArchsType

type PlatformsArchsType = map[string]PlatformsAMIsType

PlatformsArchsType maps architecture to version-AMI mappings.

type PlatformsType

type PlatformsType = map[string]PlatformsArchsType

PlatformsType maps OS flavor to architecture-version-AMI mappings.

type SubnetConfig

type SubnetConfig struct {
	ID              string `json:"id"`
	MacOSCompatible bool   `json:"macos_compatible"`
}

SubnetConfig defines a subnet with its macOS compatibility flag.

Directories

Path Synopsis
Package ec2 provides helpers for creating and managing AWS EC2 resources.
Package ec2 provides helpers for creating and managing AWS EC2 resources.

Jump to

Keyboard shortcuts

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