Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Testing and Badging #4

Merged
merged 3 commits into from
May 26, 2024
Merged
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
28 changes: 28 additions & 0 deletions .github/workflows/cloudformation-validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: CloudFormation Validation

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: CloudFormation Template Validation
run: |
pip install awscli
aws cloudformation validate-template --template-body file://encrypted-rds-cf-template.yml --region us-east-1
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- name: CloudFormation Linter
run: |
pip install cfn-lint
cfn-lint -I encrypted-rds-cf-template.yml
25 changes: 0 additions & 25 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# aws-encrypted-rds-cf-template
[![Build Status](https://travis-ci.org/getcft/aws-encrypted-rds-cf-template.svg?branch=master)](https://travis-ci.org/getcft/aws-encrypted-rds-cf-template)
[![CloudFormation Validation](https://github.com/getcft/aws-encrypted-rds-cf-template/actions/workflows/cloudformation-validation.yml/badge.svg)](https://github.com/getcft/aws-encrypted-rds-cf-template//actions/workflows/cloudformation-validation.yml)

## Description:

Expand Down
16 changes: 9 additions & 7 deletions encrypted-rds-cf-template.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright [2019] [Phil Chen]
# Copyright [2024] [Phil Chen]

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -15,6 +15,12 @@
AWSTemplateFormatVersion: 2010-09-09
Description: VPC with Encrypted RDS Template

Parameters:
RdsMasterPassword:
Type: String
NoEcho: true
Description: Master Password for RDS

Mappings:

NetworkToSubnet:
Expand Down Expand Up @@ -169,8 +175,6 @@ Resources:

# Route traffic through the internet gateway
RoutePubZoneA:
DependsOn:
- InternetGateway
Type: AWS::EC2::Route
Properties:
DestinationCidrBlock: '0.0.0.0/0'
Expand All @@ -181,8 +185,6 @@ Resources:

# Route traffic through the internet gateway
RoutePubZoneB:
DependsOn:
- InternetGateway
Type: AWS::EC2::Route
Properties:
DestinationCidrBlock: 0.0.0.0/0
Expand Down Expand Up @@ -306,8 +308,8 @@ Resources:
StorageEncrypted: true
KmsKeyId: !Ref rdsKey
MasterUsername: 'dbuser'
MasterUserPassword: 'Passw0rd!'
DBInstanceClass: db.t2.small
MasterUserPassword: !Ref RdsMasterPassword
DBInstanceClass: db.t3.micro
AllocatedStorage: 5
# To add a specific storage type add "StorageType: gp2, io1, or standard" for io1 you must also declare "Iops: with an integer equal or greater then 1000"
# gp2 is General Purpose (SSD), io1 is provisioned IOPS, and standard is magnetic
Expand Down