Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: umotif-public/terraform-aws-backup
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1.1.0
Choose a base ref
...
head repository: umotif-public/terraform-aws-backup
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
  • 8 commits
  • 25 files changed
  • 2 contributors

Commits on Dec 15, 2020

  1. Module testing (#5)

    * Introduce Terratest
    
    1. Refactor KMS module to use `data` block for policy
    2. Refactor VPC and subnets to use default vpc
    3. Variablise naming of each resource
    4. Add initial set of tests for Vault
    
    * Use default KMS keys
    
    * Documentation updates
    
    * Test Vault creation only
    
    * Update pre-commit-config
    
    * Module fix
    
    * Add new example and update test
    
    * golint
    
    * Adjustments to README
    
    * Use 'Equal' instead of 'Contains'
    Abdul Wahid authored Dec 15, 2020
    Copy the full SHA
    3e4a48f View commit details

Commits on Dec 22, 2020

  1. Add github actions workflow for Terratest (#6)

    * Introduce Terratest
    
    1. Refactor KMS module to use `data` block for policy
    2. Refactor VPC and subnets to use default vpc
    3. Variablise naming of each resource
    4. Add initial set of tests for Vault
    
    * Test Vault creation only
    
    * Module fix
    
    * golint
    
    * Adjustments to README
    
    * Add github actions workflow for Terratest
    
    * Fix ubuntu version
    Abdul Wahid authored Dec 22, 2020
    Copy the full SHA
    5fec7d2 View commit details
  2. Update README.md

    marcincuber authored Dec 22, 2020
    Copy the full SHA
    d6990bf View commit details

Commits on Jan 8, 2021

  1. Update README.md

    Abdul Wahid authored Jan 8, 2021
    Copy the full SHA
    8f7667b View commit details

Commits on Apr 8, 2021

  1. Cleanup (#7)

    * README updated
    * Removed unused variables
    * Updated Github Actions and Go related modules
    Abdul Wahid authored Apr 8, 2021
    Copy the full SHA
    d0b5baf View commit details
  2. Add continuous backup feature (#8)

    * Add new continuous backup feature
    * Updated examples
    Abdul Wahid authored Apr 8, 2021
    Copy the full SHA
    b124d74 View commit details

Commits on Apr 27, 2021

  1. Add SNS Notifications to Backup Vault (#10)

    * Add SNS Notifications to Backup Vault
    
    * Revert "Cleanup (#7)"
    
    This reverts commit d0b5baf.
    
    * Update examples
    
    * Change policy documents from json to data sources
    
    * Cleanup IAM policies to be China friendly
    
    * Use a bool for creating sns topic
    
    * Fix conditions + move data sources to data.tf
    Abdul Wahid authored Apr 27, 2021
    Copy the full SHA
    976339d View commit details

Commits on Apr 28, 2021

  1. Add a missing conditional (#11)

    SNS topic should only be created if both conditions are met
    Abdul Wahid authored Apr 28, 2021
    Copy the full SHA
    be85256 View commit details
56 changes: 56 additions & 0 deletions .github/workflows/terraform-checks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Lint and Validate

on:
push:
branches:
- '!master'
pull_request:
branches:
- master

jobs:
fmt:
runs-on: ubuntu-latest
name: Terraform fmt
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup Terraform
uses: hashicorp/setup-terraform@v1
with:
terraform_version: 0.14.10
terraform_wrapper: false

- name: Terraform fmt
run: terraform fmt -check -diff -recursive

validate:
runs-on: ubuntu-latest
name: Terraform Validate
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup Terraform
uses: hashicorp/setup-terraform@v1
with:
terraform_version: 0.14.10
terraform_wrapper: false

- name: Terraform init
run: terraform init

- name: Validate Module
env:
AWS_REGION: 'eu-west-1'
run: terraform validate

- name: Validate Examples
run: |
for example in $(find examples -maxdepth 1 -mindepth 1 -type d); do
cd ${example}
terraform init
terraform validate
cd -
done
55 changes: 55 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Terratest

on:
push:
branches:
- '!master'
pull_request:
branches:
- master

jobs:
terratest:
name: Infrastructure Tests
runs-on: ubuntu-20.04
env:
working-directory: ./test

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.16.3
- name: Install dependencies
run: |
go mod download
go get -u golang.org/x/lint/golint
working-directory: ${{env.working-directory}}
- name: Run checks
run: |
go vet .
golint .
working-directory: ${{env.working-directory}}

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: eu-west-1
role-skip-session-tagging: true
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
role-duration-seconds: 1800

- name: Setup Terraform
uses: hashicorp/setup-terraform@v1
with:
terraform_version: 0.14.10
terraform_wrapper: false

- name: Run Go Tests
run: go test -v -timeout 30m
working-directory: ${{env.working-directory}}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Local .terraform directories
**/.terraform/*
*.terraform.lock.hcl

# .tfstate files
*.tfstate
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.3.0
rev: v3.4.0
hooks:
- id: check-added-large-files
args: ['--maxkb=500']
@@ -18,7 +18,7 @@ repos:
args: ['--allow-missing-credentials']
- id: trailing-whitespace
- repo: git://github.com/antonbabenko/pre-commit-terraform
rev: v1.44.0
rev: v1.50.0
hooks:
- id: terraform_fmt
- id: terraform_docs
33 changes: 32 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -2,11 +2,42 @@

All notable changes to this project will be documented in this file.

<a name="unreleased"></a>
## [Unreleased]

- Add SNS Notifications to Backup Vault
- Add continuous backup feature ([#8](https://github.com/umotif-public/terraform-aws-backup/issues/8))
- Update README.md
- Add github actions workflow for Terratest ([#6](https://github.com/umotif-public/terraform-aws-backup/issues/6))


<a name="1.2.0"></a>
## [1.2.0] - 2020-12-15

- Module testing ([#5](https://github.com/umotif-public/terraform-aws-backup/issues/5))


<a name="1.1.0"></a>
## [1.1.0] - 2020-11-18

- Allow for multiple selection conditions for a backup plan ([#4](https://github.com/umotif-public/terraform-aws-backup/issues/4))
- Update example in README ([#3](https://github.com/umotif-public/terraform-aws-backup/issues/3))


<a name="1.0.1"></a>
## [1.0.1] - 2020-11-13

- target_vault_name reference a resource not a variable ([#2](https://github.com/umotif-public/terraform-aws-backup/issues/2))


<a name="1.0.0"></a>
## 1.0.0 - 2020-11-09

- Complete AWS Backup module ([#1](https://github.com/umotif-public/terraform-aws-backup/issues/1))
- Initial commit


[Unreleased]: https://github.com/umotif-public/terraform-aws-backup/compare/1.0.0...HEAD
[Unreleased]: https://github.com/umotif-public/terraform-aws-backup/compare/1.2.0...HEAD
[1.2.0]: https://github.com/umotif-public/terraform-aws-backup/compare/1.1.0...1.2.0
[1.1.0]: https://github.com/umotif-public/terraform-aws-backup/compare/1.0.1...1.1.0
[1.0.1]: https://github.com/umotif-public/terraform-aws-backup/compare/1.0.0...1.0.1
Loading