Skip to content

Commit 583f72f

Browse files
committed
upgrade to 0.14
1 parent 1108da9 commit 583f72f

File tree

6 files changed

+50
-45
lines changed

6 files changed

+50
-45
lines changed

.github/workflows/terraform.yml

Lines changed: 39 additions & 23 deletions
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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
steps:
1313

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

1717
- name: Configure AWS Credentials
1818
uses: clouddrove/configure-aws-credentials@v1

_example/.terraform.lock.hcl

Lines changed: 0 additions & 19 deletions
This file was deleted.

_example/example.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ provider "aws" {
33
}
44

55
module "vpc" {
6-
source = "git::https://github.com/clouddrove/terraform-aws-vpc.git?ref=0.14"
6+
source = "git::https://github.com/clouddrove/terraform-aws-vpc.git?ref=0.14.0"
77
name = "vpc"
88
repository = "https://registry.terraform.io/modules/clouddrove/vpc/aws/0.14.0"
99
environment = "test"

main.tf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,14 @@
88
# convention.
99

1010
module "labels" {
11-
source = "git::https://github.com/clouddrove/terraform-labels.git?ref=0.14"
11+
source = "git::https://github.com/clouddrove/terraform-labels.git?ref=0.14.0"
1212

13+
enabled = var.enable_security_group
1314
name = var.name
1415
repository = var.repository
1516
environment = var.environment
1617
managedby = var.managedby
18+
attributes = var.attributes
1719
label_order = var.label_order
1820
}
1921

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ variable "label_order" {
3636
description = "Label order, e.g. `name`,`application`."
3737
}
3838

39+
variable "attributes" {
40+
type = list
41+
default = []
42+
description = "Additional attributes (e.g. `1`)."
43+
}
44+
3945
variable "tags" {
4046
type = map(string)
4147
default = {}

0 commit comments

Comments
 (0)