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
Name | Type | Description |
---|---|---|
provider | AwsProviderSpec | Provider specifies the AWS provider settings for this EC2 instance. Optional |
instance | Ec2InstanceSpec | Instance specifies the EC2 instance details. Optional |
securityGroup | SecurityGroupSpec | SecurityGroup specifies the security group settings. Optional |
loadBalancer | LoadBalancerSpec | LoadBalancer specifies the load balancer settings. Optional |
targetGroup | TargetGroupSpec | TargetGroups specifies the target groups for the load balancer |
SecurityGroupSpec
Name | Type | Description |
---|---|---|
name | string | Name specifies the name of the security group. Optional |
vpcId | string | VpcId specifies the VPC ID where the security group should be created. Optional |
egress | []SecurityGroupRuleConfig | Egress specifies the egress rules. Optional |
ingress | []SecurityGroupRuleConfig | Ingress specifies the ingress rules. Optional |
ipProtocol | string | IpProtocol specifies the IP protocol to use. Optional |
tags | map[string]string | Tags are metadata to assign to the security group. Optional |
SecurityGroupRuleConfig
Name | Type | Description |
---|---|---|
fromPort | int32 | FromPort specifies the starting port for the rule. Optional |
toPort | int32 | ToPort specifies the ending port for the rule. Optional |
protocol | string | Protocol specifies the protocol used in the rule. Optional |
cidrBlocks | []string | CidrBlocks specifies the CIDR blocks for the rule. Optional |
securityGroups | []string | SecurityGroups specifies the security groups to associate with the rule. Optional |
Ec2InstanceSpec
Name | Type | Description |
---|---|---|
name | string | Name specifies the name of the EC2 instance. Optional |
imageId | string | ImageId specifies the AMI ID for the EC2 instance. Optional |
instanceType | string | InstanceType specifies the instance type. Required |
tags | map[string]string | Tags are metadata to assign to the EC2 instance. Optional |
keyName | string | KeyName specifies the key pair name. Optional |
securityGroupIds | []string | SecurityGroupIds specifies the IDs of the security groups. Optional |
subnetId | string | SubnetId specifies the subnet ID for the EC2 instance. Optional |
volumes | []VolumeSpec | Volumes specifies the volumes to attach to the EC2 instance. Optional |
userData | string | UserData specifies the user data to pass to the EC2 instance. Optional |
instanceProfileArn | string | InstanceProfileArn specifies the ARN of the IAM instance profile. Optional |
publicKey | string | PublicKey specifies the public key for the EC2 instance. Optional |
targetGroupArn | string | TargetGroupArn specifies the ARN of the target group. Optional |
VolumeSpec
Name | Type | Description |
---|---|---|
deviceName | string | DeviceName specifies the device name for this volume |
deleteOnTermination | bool | DeleteOnTermination specifies whether the volume should be deleted upon instance termination |
volumeSize | int32 | VolumeSize specifies the size of the volume |
volumeType | string | VolumeType specifies the type of the volume |
volumeId | string | VolumeId specifies the ID of the EBS volume. Optional |
LoadBalancerSpec
Name | Type | Description |
---|---|---|
name | string | Name specifies the name of the load balancer |
type | string | Type specifies the type of the load balancer |
subnets | []string | Subnets specifies the subnets for the load balancer |
securityGroups | []string | SecurityGroups specifies the security groups for the load balancer. Optional |
scheme | string | Scheme specifies the scheme for the load balancer. Optional |
instanceId | string | InstanceId specifies the instance ID for the load balancer |
tags | map[string]string | Tags are metadata to assign to the load balancer. Optional |
TargetGroupSpec
Name | Type | Description |
---|---|---|
name | string | Name specifies the name of the target group |
port | int32 | Port specifies the port used for routing traffic |
protocol | string | Protocol specifies the protocol used |
vpcId | string | VpcId specifies the VPC ID where the target group is to be created |
targetType | string | TargetType specifies the type of target |
healthCheck | HealthCheckSpec | HealthCheck specifies the settings for health checking |
tags | map[string]string | Tags are metadata to assign to the target group. Optional |
HealthCheckSpec
Name | Type | Description |
---|---|---|
protocol | string | Protocol specifies the protocol used for the health check |
port | string | Port specifies the port for the health check |
path | string | Path specifies the URL for the health check |
intervalSeconds | int32 | IntervalSeconds specifies the interval for the health check |
timeoutSeconds | int32 | TimeoutSeconds specifies the timeout for the health check |
healthyThreshold | int32 | HealthyThreshold specifies the number of successful checks to consider the health check as passed |
unhealthyThreshold | int32 | UnhealthyThreshold specifies the number of failed checks to consider the health check as failed |
successCodes | string | SuccessCodes specifies the HTTP codes to use when checking for a successful response |
Status
Ec2Status
Name | Type | Description |
---|---|---|
condition | metav1.Condition | Condition indicates the condition of the security group. Optional |
instance | Ec2InstanceStatus | Instances specifies the status of the EC2 instances. Optional |
securityGroup | SecurityGroupStatus | SecurityGroup specifies the status of the security group. Optional |
loadBalancer | LoadBalancerStatus | LoadBalancers specifies the status of the load balancers. Optional |
targetGroup | TargetGroupStatus | TargetGroups specifies the status of the target groups. Optional |
SecurityGroupStatus
Name | Type | Description |
---|---|---|
condition | metav1.Condition | Condition indicates the condition of the security group. Optional |
name | string | Name specifies the name of the security group. Optional |
arn | string | Arn specifies the Amazon Resource Name of the security group. Optional |
id | string | Id specifies the ID of the security group. Optional |
LoadBalancerStatus
Name | Type | Description |
---|---|---|
condition | metav1.Condition | Condition indicates the condition of the load balancer. Optional |
name | string | Name specifies the name of the load balancer. Optional |
arn | string | Arn specifies the Amazon Resource Name of the load balancer. Optional |
id | string | Id specifies the ID of the load balancer. Optional |
listenerArns | []string | ListenerArns specifies the ARNs of the listeners. Optional |
TargetGroupStatus
Name | Type | Description |
---|---|---|
condition | metav1.Condition | Condition indicates the condition of the target group. Optional |
name | string | Name specifies the name of the target group. Optional |
arn | string | Arn specifies the Amazon Resource Name of the target group. Optional |
id | string | Id specifies the ID of the target group. Optional |
Ec2InstanceStatus
Name | Type | Description |
---|---|---|
condition | metav1.Condition | Condition indicates the condition of the EC2 instance. Optional |
name | string | Name specifies the name of the EC2 instance. Required |
arn | string | Arn specifies the Amazon Resource Name of the EC2 instance. Optional |
volumes | []VolumeStatus | Volumes specifies the IDs of the attached volumes. Optional |
VolumeStatus
Name | Type | Description |
---|---|---|
deviceName | string | DeviceName specifies the device name for this volume |
volumeId | string | VolumeId specifies the ID of the EBS volume |