|
| 1 | +--- |
| 2 | +name: Create EC2 Instance Survey |
| 3 | +description: Survey to configure the EC2 instance creation pattern |
| 4 | +spec: |
| 5 | + - type: text |
| 6 | + question_name: AWS Region |
| 7 | + question_description: AWS region where resources should be created |
| 8 | + variable: aws_region |
| 9 | + required: true |
| 10 | + |
| 11 | + - type: text |
| 12 | + question_name: Instance Name |
| 13 | + question_description: Name of EC2 instance to create |
| 14 | + variable: instance_name |
| 15 | + required: true |
| 16 | + |
| 17 | + - type: text |
| 18 | + question_name: Instance Type |
| 19 | + question_description: Type of EC2 instance to create (e.g., t2.micro, m5.large) |
| 20 | + variable: instance_type |
| 21 | + required: true |
| 22 | + |
| 23 | + - type: text |
| 24 | + question_name: AMI ID |
| 25 | + question_description: Amazon Machine Image (AMI) ID to use for the instance, if not provided will default to the RHEL 9 AMI for the provided region and instance type |
| 26 | + variable: ami_id |
| 27 | + required: false |
| 28 | + |
| 29 | + - type: text |
| 30 | + question_name: Key Pair Name |
| 31 | + question_description: Name of key pair to use or create for SSH access to the EC2 instance. Defaults to '{{ instance_name }}-key' |
| 32 | + variable: key_name |
| 33 | + required: false |
| 34 | + |
| 35 | + - type: multiplechoice |
| 36 | + question_name: Wait for State |
| 37 | + question_description: Whether to wait for the EC2 instance to be in the running state before continuing. Defaults to true |
| 38 | + variable: wait_for_state |
| 39 | + required: false |
| 40 | + choices: |
| 41 | + - "true" |
| 42 | + - "false" |
| 43 | + |
| 44 | + - type: text |
| 45 | + question_name: Instance Tags |
| 46 | + question_description: 'A dict of tags for the instance, e.g. {"environment: test", "owner": "team foobar"}' |
| 47 | + variable: instance_tags |
| 48 | + required: false |
| 49 | + |
| 50 | + - type: text |
| 51 | + question_name: VPC Name |
| 52 | + question_description: Name of the VPC to create. Defaults to '{{instance_name}}-vpc' |
| 53 | + variable: vpc_name |
| 54 | + required: false |
| 55 | + |
| 56 | + - type: text |
| 57 | + question_name: VPC CIDR Block |
| 58 | + question_description: CIDR block to use for the VPC being created. Defaults to 10.0.0.0/24 |
| 59 | + variable: vpc_cidr |
| 60 | + required: false |
| 61 | + |
| 62 | + - type: text |
| 63 | + question_name: Subnet CIDR block |
| 64 | + question_description: CIDR block to use for the subnet being created. 10.0.0.0/25 |
| 65 | + variable: subnet_cidr |
| 66 | + required: false |
| 67 | + |
| 68 | + - type: text |
| 69 | + question_name: Security Group Name |
| 70 | + question_description: Name of the security group to create for securing traffic to the instance. Defaults to '{{ instance_name }}-sg' |
| 71 | + variable: sg_name |
| 72 | + required: false |
| 73 | + |
| 74 | + - type: text |
| 75 | + question_name: Security Group Description |
| 76 | + question_description: Description for the security group. Defaults to 'Security group for EC2 instance {{ instance_name }}' |
| 77 | + variable: sg_description |
| 78 | + required: false |
| 79 | + |
| 80 | + - type: textarea |
| 81 | + question_name: Security Group Rules |
| 82 | + question_description: "A list of security group rules in yaml format, e.g.: |
| 83 | + - proto: tcp |
| 84 | + ports: 80 |
| 85 | + cidr_ip: 0.0.0.0/0 |
| 86 | + Defaults to allowing SSH access from within the VPC" |
| 87 | + variable: sg_rules |
| 88 | + required: false |
| 89 | + |
| 90 | + - type: multiplechoice |
| 91 | + question_name: Create External Access Resources |
| 92 | + question_description: Whether to create resources for external access to the EC2 instance. Defaults to true. When true, adds security groups rules allowing inbound HTTP and HTTPS traffic, creates an internet gateway, creates a custom route table routing all internet traffic to the gateway, and allocates an elastic IP address for the instance. |
| 93 | + variable: external_access |
| 94 | + required: false |
| 95 | + choices: |
| 96 | + - "true" |
| 97 | + - "false" |
0 commit comments