Skip to content

Commit dddffac

Browse files
author
Nikita Dugar
authored
Merge pull request #15 from clouddrove/0.14
upgrade to 0.14
2 parents 8619685 + 5a10955 commit dddffac

14 files changed

+114
-632
lines changed

.github/workflows/readme.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -12,30 +12,30 @@ jobs:
1212
- name: 'Checkout'
1313
uses: actions/checkout@master
1414

15-
- name: Set up Python 3.7.
15+
- name: 'Set up Python 3.7'
1616
uses: actions/setup-python@v2
1717
with:
1818
python-version: '3.x'
1919

2020
- name: 'create readme'
21-
uses: 'clouddrove/github-actions@v4.0'
21+
uses: 'clouddrove/github-actions@v6.0'
2222
with:
2323
actions_subcommand: 'readme'
2424
github_token: '${{ secrets.GITHUB}}'
2525
env:
2626
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN}}
2727

2828

29-
- name: pre-commit check errors
29+
- name: 'pre-commit check errors'
3030
uses: pre-commit/[email protected]
3131
continue-on-error: true
3232

33-
- name: pre-commit fix erros
33+
- name: 'pre-commit fix erros'
3434
uses: pre-commit/[email protected]
3535
continue-on-error: true
3636

3737
- name: 'push readme'
38-
uses: 'clouddrove/github-actions@v4.0'
38+
uses: 'clouddrove/github-actions@v6.0'
3939
continue-on-error: true
4040
with:
4141
actions_subcommand: 'push'

.github/workflows/terraform.yml

+39-23
Original file line numberDiff line numberDiff line change
@@ -5,50 +5,66 @@ on:
55
- master
66

77
jobs:
8-
terraform:
9-
name: 'Terraform'
8+
fmt:
9+
name: 'terraform fmt'
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: 'Checkout'
13-
uses: actions/checkout@master
13+
uses: actions/checkout@v2.3.4
1414

15-
- name: Configure AWS Credentials
15+
- name: 'Terraform Format'
16+
uses: 'clouddrove/[email protected]'
17+
with:
18+
actions_subcommand: 'fmt'
19+
20+
validate:
21+
name: 'terraform validate'
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: 'Checkout'
25+
uses: actions/[email protected]
26+
27+
- name: 'Configure AWS Credentials'
1628
uses: clouddrove/configure-aws-credentials@v1
1729
with:
1830
aws-access-key-id: ${{ secrets.TEST_AWS_ACCESS_KEY }}
1931
aws-secret-access-key: ${{ secrets.TEST_AWS_ACCESS_SECRET_KEY }}
2032
aws-region: us-east-2
2133

22-
- name: 'Terraform Format'
23-
uses: 'clouddrove/[email protected]'
24-
with:
25-
actions_subcommand: 'fmt'
26-
2734
- name: 'Terraform init'
28-
uses: 'clouddrove/github-actions@v4.0'
35+
uses: 'clouddrove/github-actions@v6.0'
2936
with:
3037
actions_subcommand: 'init'
3138
tf_actions_working_dir: ./_example
3239

3340
- name: 'Terraform validate'
34-
uses: 'clouddrove/github-actions@v4.0'
41+
uses: 'clouddrove/github-actions@v6.0'
3542
with:
3643
actions_subcommand: 'validate'
3744
tf_actions_working_dir: ./_example
3845

39-
- name: 'Terraform plan'
40-
uses: 'clouddrove/[email protected]'
46+
plan:
47+
name: 'terraform plan'
48+
runs-on: ubuntu-latest
49+
steps:
50+
- name: 'Checkout'
51+
uses: actions/[email protected]
52+
53+
- name: 'Terraform init'
54+
uses: 'clouddrove/[email protected]'
4155
with:
42-
actions_subcommand: 'plan'
56+
actions_subcommand: 'init'
4357
tf_actions_working_dir: ./_example
4458

45-
- name: 'Slack Notification'
46-
uses: clouddrove/action-slack@v2
59+
- name: 'Configure AWS Credentials'
60+
uses: clouddrove/configure-aws-credentials@v1
61+
with:
62+
aws-access-key-id: ${{ secrets.TEST_AWS_ACCESS_KEY }}
63+
aws-secret-access-key: ${{ secrets.TEST_AWS_ACCESS_SECRET_KEY }}
64+
aws-region: us-east-2
65+
66+
- name: 'Terraform plan'
67+
uses: 'clouddrove/[email protected]'
4768
with:
48-
status: ${{ job.status }}
49-
fields: repo,author
50-
author_name: 'CloudDrove'
51-
env:
52-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # required
53-
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_TERRAFORM }} # required
54-
if: always()
69+
actions_subcommand: 'plan'
70+
tf_actions_working_dir: ./_example

.github/workflows/terratest.yml

+7-9
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,27 @@ on:
66
types: [labeled]
77

88
jobs:
9-
terraform:
10-
name: 'Terraform'
9+
Terratest:
10+
name: 'Terratest'
1111
runs-on: ubuntu-latest
1212
steps:
1313

1414
- name: 'Checkout'
15-
uses: actions/checkout@master
15+
uses: actions/checkout@v2.3.4
1616

17-
- name: Configure AWS Credentials
17+
- name: 'Configure AWS Credentials'
1818
uses: clouddrove/configure-aws-credentials@v1
1919
with:
2020
aws-access-key-id: ${{ secrets.TEST_AWS_ACCESS_KEY }}
2121
aws-secret-access-key: ${{ secrets.TEST_AWS_ACCESS_SECRET_KEY }}
2222
aws-region: us-east-2
2323

2424
- name: 'Terratest'
25-
if: ${{ github.event.label.name == 'terratest' }}
26-
uses: 'clouddrove/[email protected]'
25+
uses: 'clouddrove/[email protected]'
2726
with:
2827
actions_subcommand: 'terratest'
28+
if: ${{ github.event.label.name == 'terratest' }}
2929
tf_actions_working_dir: '_test'
30-
env:
31-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3230

3331
- name: 'Slack Notification'
3432
uses: clouddrove/action-slack@v2
@@ -39,4 +37,4 @@ jobs:
3937
env:
4038
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # required
4139
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_TERRAFORM }} # required
42-
if: always()
40+
if: always()

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
.terraform
55
.idea
66
*.iml
7-
go.sum
7+
*.terraform.lock.hcl

.pre-commit-config.yaml

+13-6
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
11
repos:
2-
- repo: git://github.com/antonbabenko/pre-commit-terraform
3-
rev: v1.43.0
2+
3+
- repo: https://github.com/gruntwork-io/pre-commit
4+
rev: v0.1.12 # Get the latest from: https://github.com/gruntwork-io/pre-commit/releases
45
hooks:
5-
- id: terraform_fmt
6+
- id: terraform-fmt
7+
- id: shellcheck
68

7-
- repo: https://github.com/pre-commit/pre-commit-hooks
8-
rev: v3.2.0
9+
- repo: git://github.com/pre-commit/pre-commit-hooks
10+
rev: v3.4.0 # Use the ref you want to point at
911
hooks:
12+
- id: end-of-file-fixer
13+
- id: trailing-whitespace
14+
- id: mixed-line-ending
15+
- id: check-byte-order-marker
16+
- id: check-executables-have-shebangs
1017
- id: check-merge-conflict
18+
- id: debug-statements
1119
- id: check-yaml
1220
- id: check-added-large-files
13-
- id: trailing-whitespace

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2020 Cloud Drove
3+
Copyright (c) 2021 Cloud Drove
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.yaml

+3-4
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ github_repo: clouddrove/terraform-aws-security-group
1616
# Badges to display
1717
badges:
1818
- name: "Terraform"
19-
image: "https://img.shields.io/badge/terraform-v0.13-green"
19+
image: "https://img.shields.io/badge/terraform-v0.14-green"
2020
url: "https://www.terraform.io"
2121
- name: "Licence"
2222
image: "https://img.shields.io/badge/License-MIT-blue.svg"
@@ -40,12 +40,11 @@ usage: |-
4040
# use this
4141
module "security_group" {
4242
source = "clouddrove/security-group/aws"
43-
version = "0.13.0"
43+
version = "0.14.0"
4444
name = "security-group"
45-
application = "clouddrove"
4645
environment = "test"
4746
protocol = "tcp"
48-
label_order = ["environment", "application", "name"]
47+
label_order = ["name", "environment"]
4948
vpc_id = "vpc-xxxxxxxxx"
5049
allowed_ip = ["172.16.0.0/16", "10.0.0.0/16"]
5150
allowed_ipv6 = ["2405:201:5e00:3684:cd17:9397:5734:a167/128"]

_example/example.tf

+13-13
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,25 @@ provider "aws" {
44

55
module "vpc" {
66
source = "clouddrove/vpc/aws"
7-
version = "0.13.0"
7+
version = "0.14.0"
88
name = "vpc"
9-
application = "clouddrove"
109
environment = "test"
11-
label_order = ["environment", "application", "name"]
10+
label_order = ["name", "environment"]
1211
cidr_block = "10.0.0.0/16"
1312
}
1413

1514
module "security_group" {
1615
source = "./../"
1716

18-
name = "security-group"
19-
application = "clouddrove"
20-
environment = "test"
21-
label_order = ["environment", "application", "name"]
22-
vpc_id = module.vpc.vpc_id
23-
protocol = "tcp"
24-
description = "Instance default security group (only egress access is allowed)."
25-
allowed_ip = ["172.16.0.0/16", "10.0.0.0/16"]
26-
allowed_ipv6 = ["2405:201:5e00:3684:cd17:9397:5734:a167/128"]
27-
allowed_ports = [22, 27017]
17+
name = "security-group"
18+
environment = "test"
19+
label_order = ["name", "environment"]
20+
21+
enable_security_group = true
22+
vpc_id = module.vpc.vpc_id
23+
protocol = "tcp"
24+
description = "Instance default security group (only egress access is allowed)."
25+
allowed_ip = ["172.16.0.0/16", "10.0.0.0/16"]
26+
allowed_ipv6 = ["2405:201:5e00:3684:cd17:9397:5734:a167/128"]
27+
allowed_ports = [22, 27017]
2828
}

_test/go.mod

-8
This file was deleted.

0 commit comments

Comments
 (0)