EC2



Amazon Elastic Compute Cloud (EC2) is a web service that provides secure, resizable compute capacity in the cloud.


Example yaml file:


apiVersion: aws.boundless.software/v1alpha1
kind: Ec2
metadata:
  name: example-ec2
spec:
  provider:
    region: us-east-1
  securityGroup:
    name: example-security-group
    vpcId: <id>
    tags:
      tag: tag
      tag2: wwwee
    egress:
      - fromPort: 30
        protocol: All
        toPort: 40
        cidrBlocks:
          - 10.0.0.0/16
    ingress:
      - fromPort: 60
        toPort: 80
        protocol: TCP
        cidrBlocks:
          - 0.0.0.0/16
  instance:
    imageId: <id>
    instanceProfileArn: arn:aws:iam::<id>:instance-profile/example-profile
    instanceType: t3.medium
    keyName: example-key
    securityGroupIds:
      - <id>
      - <id>
    subnetId: <id>
    tags:
      Project: ExampleProject
      userData: example-data
      test: example-test
      tagg: example-tag
      yeaah: example-yeah
    volumes:
      - deviceName: /dev/sda1
        volumeSize: 200
        volumeId: <id>
        volumeType: gp2
        deleteOnTermination: true
  loadBalancer:
    name: example-load-balancer
    scheme: internet-facing
    type: application
    instanceId: <id>
    subnets:
      - <id>
      - <id>
    securityGroups:
      - <id>
      - <id>
    tags:
      tagKey1: example-value1
      tagKey2: example-value2
      tag2: example-value3
      tag3: example-value4
      tag4: example-value5
  targetGroup:
    name: example-target-group
    port: 80
    tags:
      tagKey1: example-value1
      tagKey2: example-value2
      tag2: example-value3
      tag3: example-value4
      tag4: example-value5
    protocol: HTTP
    vpcId: <id>
    targetType: instance
    healthCheck:
      protocol: HTTP
      port: traffic-port
      path: /
      intervalSeconds: 30
      timeoutSeconds: 5
      healthyThreshold: 5
      unhealthyThreshold: 2
      successCodes: 200-299

Inputs


Ec2Spec


NameTypeDescription
providerAwsProviderSpecProvider specifies the AWS provider settings for this EC2 instance. Optional
instanceEc2InstanceSpecInstance specifies the EC2 instance details. Optional
securityGroupSecurityGroupSpecSecurityGroup specifies the security group settings. Optional
loadBalancerLoadBalancerSpecLoadBalancer specifies the load balancer settings. Optional
targetGroupTargetGroupSpecTargetGroups specifies the target groups for the load balancer

SecurityGroupSpec


NameTypeDescription
namestringName specifies the name of the security group. Optional
vpcIdstringVpcId specifies the VPC ID where the security group should be created. Optional
egress[]SecurityGroupRuleConfigEgress specifies the egress rules. Optional
ingress[]SecurityGroupRuleConfigIngress specifies the ingress rules. Optional
ipProtocolstringIpProtocol specifies the IP protocol to use. Optional
tagsmap[string]stringTags are metadata to assign to the security group. Optional

SecurityGroupRuleConfig


NameTypeDescription
fromPortint32FromPort specifies the starting port for the rule. Optional
toPortint32ToPort specifies the ending port for the rule. Optional
protocolstringProtocol specifies the protocol used in the rule. Optional
cidrBlocks[]stringCidrBlocks specifies the CIDR blocks for the rule. Optional
securityGroups[]stringSecurityGroups specifies the security groups to associate with the rule. Optional

Ec2InstanceSpec


NameTypeDescription
namestringName specifies the name of the EC2 instance. Optional
imageIdstringImageId specifies the AMI ID for the EC2 instance. Optional
instanceTypestringInstanceType specifies the instance type. Required
tagsmap[string]stringTags are metadata to assign to the EC2 instance. Optional
keyNamestringKeyName specifies the key pair name. Optional
securityGroupIds[]stringSecurityGroupIds specifies the IDs of the security groups. Optional
subnetIdstringSubnetId specifies the subnet ID for the EC2 instance. Optional
volumes[]VolumeSpecVolumes specifies the volumes to attach to the EC2 instance. Optional
userDatastringUserData specifies the user data to pass to the EC2 instance. Optional
instanceProfileArnstringInstanceProfileArn specifies the ARN of the IAM instance profile. Optional
publicKeystringPublicKey specifies the public key for the EC2 instance. Optional
targetGroupArnstringTargetGroupArn specifies the ARN of the target group. Optional

VolumeSpec


NameTypeDescription
deviceNamestringDeviceName specifies the device name for this volume
deleteOnTerminationboolDeleteOnTermination specifies whether the volume should be deleted upon instance termination
volumeSizeint32VolumeSize specifies the size of the volume
volumeTypestringVolumeType specifies the type of the volume
volumeIdstringVolumeId specifies the ID of the EBS volume. Optional

LoadBalancerSpec


NameTypeDescription
namestringName specifies the name of the load balancer
typestringType specifies the type of the load balancer
subnets[]stringSubnets specifies the subnets for the load balancer
securityGroups[]stringSecurityGroups specifies the security groups for the load balancer. Optional
schemestringScheme specifies the scheme for the load balancer. Optional
instanceIdstringInstanceId specifies the instance ID for the load balancer
tagsmap[string]stringTags are metadata to assign to the load balancer. Optional

TargetGroupSpec


NameTypeDescription
namestringName specifies the name of the target group
portint32Port specifies the port used for routing traffic
protocolstringProtocol specifies the protocol used
vpcIdstringVpcId specifies the VPC ID where the target group is to be created
targetTypestringTargetType specifies the type of target
healthCheckHealthCheckSpecHealthCheck specifies the settings for health checking
tagsmap[string]stringTags are metadata to assign to the target group. Optional

HealthCheckSpec


NameTypeDescription
protocolstringProtocol specifies the protocol used for the health check
portstringPort specifies the port for the health check
pathstringPath specifies the URL for the health check
intervalSecondsint32IntervalSeconds specifies the interval for the health check
timeoutSecondsint32TimeoutSeconds specifies the timeout for the health check
healthyThresholdint32HealthyThreshold specifies the number of successful checks to consider the health check as passed
unhealthyThresholdint32UnhealthyThreshold specifies the number of failed checks to consider the health check as failed
successCodesstringSuccessCodes specifies the HTTP codes to use when checking for a successful response

Status


Ec2Status


NameTypeDescription
conditionmetav1.ConditionCondition indicates the condition of the security group. Optional
instanceEc2InstanceStatusInstances specifies the status of the EC2 instances. Optional
securityGroupSecurityGroupStatusSecurityGroup specifies the status of the security group. Optional
loadBalancerLoadBalancerStatusLoadBalancers specifies the status of the load balancers. Optional
targetGroupTargetGroupStatusTargetGroups specifies the status of the target groups. Optional

SecurityGroupStatus


NameTypeDescription
conditionmetav1.ConditionCondition indicates the condition of the security group. Optional
namestringName specifies the name of the security group. Optional
arnstringArn specifies the Amazon Resource Name of the security group. Optional
idstringId specifies the ID of the security group. Optional

LoadBalancerStatus


NameTypeDescription
conditionmetav1.ConditionCondition indicates the condition of the load balancer. Optional
namestringName specifies the name of the load balancer. Optional
arnstringArn specifies the Amazon Resource Name of the load balancer. Optional
idstringId specifies the ID of the load balancer. Optional
listenerArns[]stringListenerArns specifies the ARNs of the listeners. Optional

TargetGroupStatus


NameTypeDescription
conditionmetav1.ConditionCondition indicates the condition of the target group. Optional
namestringName specifies the name of the target group. Optional
arnstringArn specifies the Amazon Resource Name of the target group. Optional
idstringId specifies the ID of the target group. Optional

Ec2InstanceStatus


NameTypeDescription
conditionmetav1.ConditionCondition indicates the condition of the EC2 instance. Optional
namestringName specifies the name of the EC2 instance. Required
arnstringArn specifies the Amazon Resource Name of the EC2 instance. Optional
volumes[]VolumeStatusVolumes specifies the IDs of the attached volumes. Optional

VolumeStatus


NameTypeDescription
deviceNamestringDeviceName specifies the device name for this volume
volumeIdstringVolumeId specifies the ID of the EBS volume



Previous

<< KMS

Next

S3 >>