Skip to content

Instantly share code, notes, and snippets.

@takakabe
Created October 12, 2017 10:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save takakabe/abfebd7c1e9048e60c0ce3cf9eb7228d to your computer and use it in GitHub Desktop.
Save takakabe/abfebd7c1e9048e60c0ce3cf9eb7228d to your computer and use it in GitHub Desktop.
Resources:
Instance:
Type: "AWS::EC2::Instance"
Properties:
AvailabilityZone: "ap-northeast-1a"
ImageId: "ami-4af5022c"
InstanceType: "t2.micro"
KeyName: "キーペア名"
PrivateIpAddress: "192.140.1.1"
SecurityGroupIds:
- "sg-XXXXXXXX"
SubnetId: "subnet-XXXXXXXX"
ElasticIP:
Type: "AWS::EC2::EIP"
Properties:
Domain: vpc
ElasticIPAssociate:
Type: AWS::EC2::EIPAssociation
Properties:
AllocationId: !GetAtt ElasticIP.AllocationId
InstanceId: !Ref Instance
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment