Skip to content

Commit

Permalink
Merge pull request #11 from tanakaryo/add-feature-cf
Browse files Browse the repository at this point in the history
#10 add new resource.
  • Loading branch information
tanakaryo authored Jun 23, 2024
2 parents 85d5c11 + 85f3fa7 commit b40e505
Show file tree
Hide file tree
Showing 8 changed files with 80 additions and 0 deletions.
Binary file added infrastructure-as-code/.DS_Store
Binary file not shown.
3 changes: 3 additions & 0 deletions infrastructure-as-code/cloudformation/apps/app1/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## Architecture
#### this simple architecture for cloudformation starting up.
![architecture](./aws-archi1.drawio.png)
19 changes: 19 additions & 0 deletions infrastructure-as-code/cloudformation/apps/app1/aws-archi1.drawio
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<mxfile host="app.diagrams.net" modified="2024-06-23T19:21:25.344Z" agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36" etag="6jDsBANctzm9ewCmjw18" version="24.6.2" type="device">
<diagram name="ページ1" id="EsSA6SOzazF9kZatQ42t">
<mxGraphModel dx="1350" dy="713" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="PP3JoJSjijkOAGgl-4jN-1" value="VPC" style="points=[[0,0],[0.25,0],[0.5,0],[0.75,0],[1,0],[1,0.25],[1,0.5],[1,0.75],[1,1],[0.75,1],[0.5,1],[0.25,1],[0,1],[0,0.75],[0,0.5],[0,0.25]];outlineConnect=0;gradientColor=none;html=1;whiteSpace=wrap;fontSize=12;fontStyle=0;container=1;pointerEvents=0;collapsible=0;recursiveResize=0;shape=mxgraph.aws4.group;grIcon=mxgraph.aws4.group_vpc2;strokeColor=#8C4FFF;fillColor=none;verticalAlign=top;align=left;spacingLeft=30;fontColor=#AAB7B8;dashed=0;" vertex="1" parent="1">
<mxGeometry x="180" y="190" width="300" height="240" as="geometry" />
</mxCell>
<mxCell id="PP3JoJSjijkOAGgl-4jN-2" value="Subnet" style="sketch=0;outlineConnect=0;gradientColor=none;html=1;whiteSpace=wrap;fontSize=12;fontStyle=0;shape=mxgraph.aws4.group;grIcon=mxgraph.aws4.group_subnet;strokeColor=#879196;fillColor=none;verticalAlign=top;align=left;spacingLeft=30;fontColor=#879196;dashed=0;" vertex="1" parent="1">
<mxGeometry x="230" y="230" width="220" height="170" as="geometry" />
</mxCell>
<mxCell id="PP3JoJSjijkOAGgl-4jN-3" value="Amazon EC2" style="sketch=0;outlineConnect=0;fontColor=#232F3E;gradientColor=none;strokeColor=#ffffff;fillColor=#232F3E;dashed=0;verticalLabelPosition=middle;verticalAlign=bottom;align=center;html=1;whiteSpace=wrap;fontSize=10;fontStyle=1;spacing=3;shape=mxgraph.aws4.productIcon;prIcon=mxgraph.aws4.ec2;" vertex="1" parent="1">
<mxGeometry x="290" y="270" width="80" height="100" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"yaml.schemas": {
"https://raw.githubusercontent.com/aws/serverless-application-model/main/samtranslator/schema/schema.json": "file:///Users/yoichiikegawa/Documents/Github/aws/infrastructure-as-code/cloudformation/apps/app1/create-ec2-network-simple/template.yaml"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
AWSTemplateFormatVersion: '2010-09-09'
Description: Simple Template

## Parameters
Parameters:
InstanceType:
Description: EC2 Instance Types.
Type: String
Default: t2.micro
AllowedValues:
- t2.micro
- t2.small
- t2.medium

## Resources.
### vpc
Resources:
simpleVpc:
Type: AWS::EC2::VPC
Properties:
CidrBlock: '192.168.0.0/16'
Tags:
- Key: 'Name'
Value: 'simple-vpc'

### subnet
simpleSubnet:
Type: AWS::EC2::Subnet
Properties:
CidrBlock: '192.168.1.0/24'
MapPublicIpOnLaunch: false
Tags:
- Key: 'Name'
Value: 'simple-subnet'
VpcId: !Ref simpleVpc

### ec2
simpleEC2Instance:
Type: AWS::EC2::Instance
Properties:
SubnetId: !Ref simpleSubnet
ImageId: "ami-0595d6e81396a9efb"
InstanceType: !Ref InstanceType
BlockDeviceMappings:
- DeviceName: '/dev/xvda'
Ebs:
VolumeType: 'gp2'
VolumeSize: 8
Tags:
- Value: 'simple-ec2-instance'
Key: 'Name'


Binary file added infrastructure-as-code/terraform/.DS_Store
Binary file not shown.
Binary file not shown.

0 comments on commit b40e505

Please sign in to comment.