Created
July 16, 2018 11:37
-
-
Save sakamaki-kazuyoshi/cd739486c0e6ea3fd685e6bc4d4b7370 to your computer and use it in GitHub Desktop.
HighPerformanceComputing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AWSTemplateFormatVersion: '2010-09-09' | |
Description: "Create BaseNetwork" | |
Parameters: | |
EnvType: | |
Description: Select Environment Type. Default is prd | |
Type: String | |
Default: prd | |
AllowedValues: | |
- prd | |
- dev | |
Mappings: | |
prd: | |
IPAddress: | |
VPCCider: 10.0.0.0/16 | |
ResourceName: | |
VPCName: hpc-test-vpc | |
InternetGatewayName: hpc-test-igw | |
Resources: | |
Ec2Vpc: | |
Type: "AWS::EC2::VPC" | |
Properties: | |
CidrBlock: !FindInMap [ Ref: EnvType, IPAddress, VPCCider ] | |
Tags: | |
- Key: Name | |
Value: !FindInMap [ Ref: EnvType, ResourceName, VPCName ] | |
Ec2InternetGateway: | |
Type: "AWS::EC2::InternetGateway" | |
Properties: | |
Tags: | |
- Key: Name | |
Value: !FindInMap [ Ref: EnvType, ResourceName, InternetGatewayName ] | |
AttachIGW: | |
Type: "AWS::EC2::VPCGatewayAttachment" | |
Properties: | |
VpcId: !Ref Ec2Vpc | |
InternetGatewayId: !Ref Ec2InternetGateway | |
Outputs: | |
StackEc2Vpc: | |
Value: !Ref Ec2Vpc | |
Export: | |
Name: !Sub "${AWS::StackName}-VPCID" | |
StackEc2InternetGateway: | |
Value: !Ref Ec2InternetGateway | |
Export: | |
Name: !Sub "${AWS::StackName}-InternetGatewayID" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment