Skip to content

Commit a1940fb

Browse files
updated and upgraded
1 parent 4c5ce5d commit a1940fb

File tree

11 files changed

+209
-78
lines changed

11 files changed

+209
-78
lines changed

.github/workflows/readme.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: 'Create README.md file'
2+
on:
3+
push:
4+
branches:
5+
- master
6+
7+
jobs:
8+
readme-create:
9+
name: 'readme-create'
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: 'Checkout'
13+
uses: actions/checkout@master
14+
15+
- name: Set up Python 3.7.
16+
uses: actions/setup-python@v2
17+
with:
18+
python-version: '3.x'
19+
20+
- name: 'create readme'
21+
uses: 'clouddrove/github-actions@v4.0'
22+
with:
23+
actions_subcommand: 'readme'
24+
github_token: '${{ secrets.GITHUB}}'
25+
env:
26+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN}}
27+
28+
29+
- name: pre-commit check errors
30+
uses: pre-commit/action@v2.0.0
31+
continue-on-error: true
32+
33+
- name: pre-commit fix erros
34+
uses: pre-commit/action@v2.0.0
35+
continue-on-error: true
36+
37+
- name: 'push readme'
38+
uses: 'clouddrove/github-actions@v4.0'
39+
continue-on-error: true
40+
with:
41+
actions_subcommand: 'push'
42+
env:
43+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN}}
44+
45+
- name: 'Slack Notification'
46+
uses: clouddrove/action-slack@v2
47+
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()

.github/workflows/terraform.yml

Lines changed: 44 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,101 +1,90 @@
11
name: 'Terraform GitHub Actions'
22
on:
3-
- pull_request
3+
pull_request:
4+
branches:
5+
- master
46

57
jobs:
68
terraform:
79
name: 'Terraform'
810
runs-on: ubuntu-latest
911
steps:
10-
1112
- name: 'Checkout'
1213
uses: actions/checkout@master
1314

15+
- name: Configure AWS Credentials
16+
uses: clouddrove/configure-aws-credentials@v1
17+
with:
18+
aws-access-key-id: ${{ secrets.TEST_AWS_ACCESS_KEY }}
19+
aws-secret-access-key: ${{ secrets.TEST_AWS_ACCESS_SECRET_KEY }}
20+
aws-region: us-east-2
21+
1422
- name: 'Terraform Format'
15-
uses: clouddrove/github-actions@v2.0
23+
uses: 'clouddrove/github-actions@v4.0'
1624
with:
1725
actions_subcommand: 'fmt'
1826

19-
- name: 'Terraform Init for memcached'
20-
uses: clouddrove/github-actions@v2.0
27+
- name: 'Terraform init for memcached'
28+
uses: 'clouddrove/github-actions@v4.0'
2129
with:
2230
actions_subcommand: 'init'
2331
tf_actions_working_dir: ./_example/memcached
2432

25-
- name: 'Terraform Init Redis'
26-
uses: clouddrove/github-actions@v2.0
33+
- name: 'Terraform validate for memcached'
34+
uses: 'clouddrove/github-actions@v4.0'
2735
with:
28-
actions_subcommand: 'init'
29-
tf_actions_working_dir: ./_example/redis
36+
actions_subcommand: 'validate'
37+
tf_actions_working_dir: ./_example/memcached
3038

31-
- name: 'Terraform Init For Redis Cluster'
32-
uses: clouddrove/github-actions@v2.0
39+
- name: 'Terraform plan for memcached'
40+
uses: 'clouddrove/github-actions@v4.0'
3341
with:
34-
actions_subcommand: 'init'
35-
tf_actions_working_dir: ./_example/redis-cluster
42+
actions_subcommand: 'plan'
43+
tf_actions_working_dir: ./_example/memcached
3644

37-
- name: Configure AWS Credentials
38-
uses: clouddrove/configure-aws-credentials@v1
45+
- name: 'Terraform init for redis'
46+
uses: 'clouddrove/github-actions@v4.0'
3947
with:
40-
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
41-
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
42-
aws-region: us-east-2
48+
actions_subcommand: 'init'
49+
tf_actions_working_dir: ./_example/redis
4350

44-
- name: 'Terraform Plan for memcached'
45-
uses: clouddrove/github-actions@v2.0
51+
- name: 'Terraform validate for redis'
52+
uses: 'clouddrove/github-actions@v4.0'
4653
with:
47-
actions_subcommand: 'plan'
48-
tf_actions_working_dir: ./_example/memcached
49-
env:
50-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
54+
actions_subcommand: 'validate'
55+
tf_actions_working_dir: ./_example/redis
5156

52-
- name: 'Terraform Plan for Redis'
53-
uses: clouddrove/github-actions@v2.0
57+
- name: 'Terraform plan for redis'
58+
uses: 'clouddrove/github-actions@v4.0'
5459
with:
5560
actions_subcommand: 'plan'
5661
tf_actions_working_dir: ./_example/redis
57-
env:
58-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5962

60-
- name: 'Terraform Plan For Redis Cluster'
61-
uses: clouddrove/github-actions@v2.0
63+
- name: 'Terraform init for redis-cluster'
64+
uses: 'clouddrove/github-actions@v4.0'
6265
with:
63-
actions_subcommand: 'plan'
66+
actions_subcommand: 'init'
6467
tf_actions_working_dir: ./_example/redis-cluster
65-
env:
66-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6768

68-
- name: 'Terratest For Memcached'
69-
uses: clouddrove/github-actions@v2.0
69+
- name: 'Terraform validate for redis-cluster'
70+
uses: 'clouddrove/github-actions@v4.0'
7071
with:
71-
actions_subcommand: 'terratest'
72-
tf_actions_working_dir: ./_test/memcached
73-
env:
74-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
75-
76-
- name: 'Terratest For Redis'
77-
uses: clouddrove/github-actions@v2.0
78-
with:
79-
actions_subcommand: 'terratest'
80-
tf_actions_working_dir: ./_test/redis
81-
env:
82-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
72+
actions_subcommand: 'validate'
73+
tf_actions_working_dir: ./_example/redis-cluster
8374

84-
- name: 'Terratest For Redis Cluster'
85-
uses: clouddrove/github-actions@v2.0
75+
- name: 'Terraform plan for redis-cluster'
76+
uses: 'clouddrove/github-actions@v4.0'
8677
with:
87-
actions_subcommand: 'terratest'
88-
tf_actions_working_dir: ./_test/redis-cluster
89-
env:
90-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
78+
actions_subcommand: 'plan'
79+
tf_actions_working_dir: ./_example/redis-cluster
9180

9281
- name: 'Slack Notification'
9382
uses: clouddrove/action-slack@v2
9483
with:
9584
status: ${{ job.status }}
9685
fields: repo,author
97-
author_name: 'Clouddrove'
86+
author_name: 'CloudDrove'
9887
env:
9988
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # required
100-
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} # required
89+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_TERRAFORM }} # required
10190
if: always()

.github/workflows/terratest.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: 'Terratest GitHub Actions'
2+
on:
3+
pull_request:
4+
branches:
5+
- master
6+
types: [labeled]
7+
8+
jobs:
9+
terraform:
10+
name: 'Terraform'
11+
runs-on: ubuntu-latest
12+
steps:
13+
14+
- name: 'Checkout'
15+
uses: actions/checkout@master
16+
17+
- name: Configure AWS Credentials
18+
uses: clouddrove/configure-aws-credentials@v1
19+
with:
20+
aws-access-key-id: ${{ secrets.TEST_AWS_ACCESS_KEY }}
21+
aws-secret-access-key: ${{ secrets.TEST_AWS_ACCESS_SECRET_KEY }}
22+
aws-region: us-east-2
23+
24+
- name: 'Terratest for memcached'
25+
if: ${{ github.event.label.name == 'terratest' }}
26+
uses: 'clouddrove/github-actions@v4.0'
27+
with:
28+
actions_subcommand: 'terratest'
29+
tf_actions_working_dir: '_test/memcached'
30+
env:
31+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32+
33+
- name: 'Terratest for redis'
34+
if: ${{ github.event.label.name == 'terratest' }}
35+
uses: 'clouddrove/github-actions@v4.0'
36+
with:
37+
actions_subcommand: 'terratest'
38+
tf_actions_working_dir: '_test/redis'
39+
env:
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41+
42+
- name: 'Terratest for redis-cluster'
43+
if: ${{ github.event.label.name == 'terratest' }}
44+
uses: 'clouddrove/github-actions@v4.0'
45+
with:
46+
actions_subcommand: 'terratest'
47+
tf_actions_working_dir: '_test/redis-cluster'
48+
env:
49+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
50+
51+
- name: 'Slack Notification'
52+
uses: clouddrove/action-slack@v2
53+
with:
54+
status: ${{ job.status }}
55+
fields: repo,author
56+
author_name: 'CloudDrove'
57+
env:
58+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # required
59+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_TERRAFORM }} # required
60+
if: always()

README.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ usage : |-
3636
### Redis
3737
```hcl
3838
module "redis" {
39-
source = "git::https://github.com/clouddrove/terraform-aws-elasticache?ref=tags/0.13.0"
39+
source = "clouddrove/elasticache/aws"
40+
version = "0.13.0"
4041
name = "redis"
4142
application = "clouddrove"
4243
environment = "test"
@@ -57,8 +58,9 @@ usage : |-
5758
### Redis Cluster
5859
```hcl
5960
module "redis-cluster" {
60-
source = "git::https://github.com/clouddrove/terraform-aws-elasticache?ref=tags/0.13.0"
61-
name = "cluster"
61+
source = "clouddrove/elasticache/aws"
62+
version = "0.13.0"
63+
name = "cluster"
6264
application = "clouddrove"
6365
environment = "test"
6466
label_order = ["environment", "application", "name"]
@@ -80,7 +82,8 @@ usage : |-
8082
### Memcache
8183
```hcl
8284
module "memcached" {
83-
source = "git::https://github.com/clouddrove/terraform-aws-elasticache?ref=tags/0.13.0"
85+
source = "clouddrove/elasticache/aws"
86+
version = "0.13.0"
8487
name = "memcached"
8588
application = "clouddrove"
8689
environment = "test"

_example/memcached/example.tf

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ provider "aws" {
33
}
44

55
module "vpc" {
6-
source = "git::https://github.com/clouddrove/terraform-aws-vpc.git?ref=tags/0.13.0"
7-
6+
source = "clouddrove/vpc/aws"
7+
version = "0.13.0"
88
name = "vpc"
99
application = "clouddrove"
1010
environment = "test"
@@ -14,8 +14,8 @@ module "vpc" {
1414
}
1515

1616
module "subnets" {
17-
source = "git::https://github.com/clouddrove/terraform-aws-subnet.git"
18-
17+
source = "clouddrove/subnet/aws"
18+
version = "0.13.0"
1919
name = "subnets"
2020
application = "clouddrove"
2121
environment = "test"
@@ -30,8 +30,8 @@ module "subnets" {
3030
}
3131

3232
module "memcached-sg" {
33-
source = "git::https://github.com/clouddrove/terraform-aws-security-group.git"
34-
33+
source = "clouddrove/security-group/aws"
34+
version = "0.13.0"
3535
name = "ssh"
3636
application = "clouddrove"
3737
environment = "test"

_example/redis-cluster/example.tf

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ provider "aws" {
33
}
44

55
module "vpc" {
6-
source = "git::https://github.com/clouddrove/terraform-aws-vpc.git?ref=tags/0.13.0"
7-
6+
source = "clouddrove/vpc/aws"
7+
version = "0.13.0"
88
name = "vpc"
99
application = "clouddrove"
1010
environment = "test"
@@ -14,8 +14,8 @@ module "vpc" {
1414
}
1515

1616
module "subnets" {
17-
source = "git::https://github.com/clouddrove/terraform-aws-subnet.git"
18-
17+
source = "clouddrove/subnet/aws"
18+
version = "0.13.0"
1919
name = "subnets"
2020
application = "clouddrove"
2121
environment = "test"
@@ -30,8 +30,8 @@ module "subnets" {
3030
}
3131

3232
module "redis-sg" {
33-
source = "git::https://github.com/clouddrove/terraform-aws-security-group.git"
34-
33+
source = "clouddrove/security-group/aws"
34+
version = "0.13.0"
3535
name = "ssh"
3636
application = "clouddrove"
3737
environment = "test"

_example/redis/example.tf

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ provider "aws" {
33
}
44

55
module "vpc" {
6-
source = "git::https://github.com/clouddrove/terraform-aws-vpc.git?ref=tags/0.13.0"
7-
6+
source = "clouddrove/vpc/aws"
7+
version = "0.13.0"
88
name = "vpc"
99
application = "clouddrove"
1010
environment = "test"
@@ -14,8 +14,8 @@ module "vpc" {
1414
}
1515

1616
module "subnets" {
17-
source = "git::https://github.com/clouddrove/terraform-aws-subnet.git"
18-
17+
source = "clouddrove/subnet/aws"
18+
version = "0.13.0"
1919
name = "subnets"
2020
application = "clouddrove"
2121
environment = "test"
@@ -30,8 +30,8 @@ module "subnets" {
3030
}
3131

3232
module "redis-sg" {
33-
source = "git::https://github.com/clouddrove/terraform-aws-security-group.git"
34-
33+
source = "clouddrove/security-group/aws"
34+
version = "0.13.0"
3535
name = "ssh"
3636
application = "clouddrove"
3737
environment = "test"

0 commit comments

Comments
 (0)