Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
93 changes: 93 additions & 0 deletions aws/cloudformation/template.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
AWSTemplateFormatVersion: '2010-09-09'
Description: 'Converted from Terraform configuration'

Resources:
MyWebApp:
Type: AWS::EC2::Instance
Properties:
ImageId: ami-005e54dee72cc1d00
InstanceType: m3.xlarge
BlockDeviceMappings:
- DeviceName: /dev/xvda
Ebs:
VolumeSize: 1000
DeleteOnTermination: true
Tags:
- Key: Environment
Value: production
- Key: Service
Value: web-app

MyHelloWorld:
Type: AWS::Lambda::Function
Properties:
FunctionName: test
Role: arn:aws:iam::123123123123:role/lambda-execution-role
MemorySize: 512
ImageUri: test
PackageType: Image
Tags:
- Key: Environment
Value: Prod

NewWebApp:
Type: AWS::EC2::Instance
Properties:
ImageId: ami-005e54dee72cc1d00
InstanceType: m3.2xlarge
BlockDeviceMappings:
- DeviceName: /dev/xvda
Ebs:
VolumeSize: 100
VolumeType: gp3
DeleteOnTermination: true
- DeviceName: /dev/sdb
Ebs:
VolumeSize: 100
VolumeType: gp3
Iops: 20000
Tags:
- Key: Environment
Value: prod
- Key: Service
Value: web-app

NewWebAppRootVolume:
Type: AWS::EC2::Volume
Properties:
Size: 100
VolumeType: gp2
AvailabilityZone: us-east-1a
Tags:
- Key: Environment
Value: production

NewWebAppVolumeAttachment:
Type: AWS::EC2::VolumeAttachment
Properties:
Device: /dev/sdc
InstanceId: !Ref NewWebApp
VolumeId: !Ref NewWebAppRootVolume

MyDB:
Type: AWS::RDS::DBInstance
Properties:
DBInstanceIdentifier: mydb
AllocatedStorage: 20
StorageType: gp3
Engine: postgres
EngineVersion: '11.13'
DBInstanceClass: db.t4g.medium
DBName: mydb
MasterUsername: admin
MasterUserPassword: mypassword
DBParameterGroupName: default.postgres11
MultiAZ: false
BackupRetentionPeriod: 7
PubliclyAccessible: false
Tags:
- Key: Environment
Value: production
- Key: Service
Value: web-app
DeletionPolicy: Delete
10 changes: 10 additions & 0 deletions aws/terraform/infracost-usage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# You can use this file to define resource usage estimates for Infracost to use when calculating
# the cost of usage-based resource, such as AWS S3 or Lambda.
# `infracost breakdown --path=. --usage-file=infracost-usage.yml [other flags]`
# See https://infracost.io/usage-file/ for docs
version: 0.1
# The following usage values apply to each resource of the given type, which is useful when you want to define defaults.
resource_type_default_usage:
aws_lambda_function:
monthly_requests: 20000000 # Monthly requests to the Lambda function.
request_duration_ms: 350 # Average duration of each request in milliseconds.
File renamed without changes.