| # Licensed to the Apache Software Foundation (ASF) under one |
| # or more contributor license agreements. See the NOTICE file |
| # distributed with this work for additional information |
| # regarding copyright ownership. The ASF licenses this file |
| # to you under the Apache License, Version 2.0 (the |
| # "License"); you may not use this file except in compliance |
| # with the License. You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, |
| # software distributed under the License is distributed on an |
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| # KIND, either express or implied. See the License for the |
| # specific language governing permissions and limitations |
| # under the License. |
| |
| Resources: |
| Instance: |
| Type: AWS::EC2::Instance |
| Properties: |
| ImageId: $AWS_VM_IMAGE_ID |
| InstanceType: $AWS_VM_INSTANCE_TYPE |
| KeyName: $AWS_SSHKEY |
| SecurityGroupIds: |
| - !Ref SecurityGroup |
| BlockDeviceMappings: |
| - DeviceName: /dev/sda1 |
| Ebs: |
| VolumeSize: $AWS_VM_DISK_SIZE |
| DeleteOnTermination: true |
| Tags: |
| - Key: Name |
| Value: ${NAME} |
| - Key: Ops |
| Value: true |
| - Key: OpsName |
| Value: ${NAME} |
| - Key: OpsType |
| Value: ubuntu |
| |
| SecurityGroup: |
| Type: AWS::EC2::SecurityGroup |
| Properties: |
| GroupName: ${NAME}-k3s |
| GroupDescription: "Allow HTTP/HTTPS and SSH inbound and outbound traffic" |
| SecurityGroupIngress: |
| - IpProtocol: tcp |
| FromPort: 80 |
| ToPort: 80 |
| CidrIp: 0.0.0.0/0 |
| - IpProtocol: tcp |
| FromPort: 443 |
| ToPort: 443 |
| CidrIp: 0.0.0.0/0 |
| - IpProtocol: tcp |
| FromPort: 22 |
| ToPort: 22 |
| CidrIp: 0.0.0.0/0 |
| - IpProtocol: tcp |
| FromPort: 16443 |
| ToPort: 16443 |
| CidrIp: 0.0.0.0/0 |
| - IpProtocol: tcp |
| FromPort: 6443 |
| ToPort: 6443 |
| CidrIp: 0.0.0.0/0 |