Skip to content

Commit

Permalink
update module tags
Browse files Browse the repository at this point in the history
  • Loading branch information
yadavprakash committed Jun 18, 2021
1 parent f1556e9 commit 39e0c01
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 37 deletions.
50 changes: 25 additions & 25 deletions .github/workflows/terraform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ jobs:
with:
actions_subcommand: 'fmt'

validate:
name: 'terraform validate'
basic_example:
name: 'basic_example'
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
Expand All @@ -47,50 +47,39 @@ jobs:
actions_subcommand: 'validate'
tf_actions_working_dir: ./_example/basic_example

- name: 'Slack Notification'
uses: clouddrove/action-slack@v2
with:
status: ${{ job.status }}
fields: repo,author
author_name: 'CloudDrove'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # required
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_TERRAFORM }} # required
if: always()

plan:
name: 'terraform plan'
secure_example:
name: 'secure_example'
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@v2.3.4

- name: 'Terraform init'
uses: 'clouddrove/github-actions@v7.0'
with:
actions_subcommand: 'init'
tf_actions_working_dir: ./_example/basic_example

- name: 'Configure AWS Credentials'
uses: clouddrove/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.TEST_AWS_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.TEST_AWS_ACCESS_SECRET_KEY }}
aws-region: us-east-2

- name: 'Terraform plan'
- name: 'Terraform init'
uses: 'clouddrove/github-actions@v7.0'
with:
actions_subcommand: 'plan'
tf_actions_working_dir: ./_example/basic_example
actions_subcommand: 'init'
tf_actions_working_dir: ./_example/secure_example

- name: 'Terraform validate'
uses: 'clouddrove/github-actions@v7.0'
with:
actions_subcommand: 'validate'
tf_actions_working_dir: ./_example/secure_example

pre-commit:
name: 'Pre-Commit'
needs:
- fmt
- plan
- validate
- basic_example
- secure_example
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
Expand All @@ -103,3 +92,14 @@ jobs:
- name: 'Pre-Commit 🔎'
uses: pre-commit/action@v2.0.3
continue-on-error: true

- name: 'Slack Notification'
uses: clouddrove/action-slack@v2
with:
status: ${{ job.status }}
fields: repo,author
author_name: 'CloudDrove'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # required
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_TERRAFORM }} # required
if: always()
2 changes: 0 additions & 2 deletions README.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ usage: |-
module "ec2" {
source = "clouddrove/ec2/aws"
version = "0.15.0"
repository = "https://registry.terraform.io/modules/clouddrove/ec2/aws/0.15.0"
environment = "test"
label_order = ["name", "environment"]
instance_count = 2
Expand Down Expand Up @@ -70,7 +69,6 @@ usage: |-
module "ec2" {
source = "clouddrove/ec2/aws"
version = "0.15.0"
repository = "https://registry.terraform.io/modules/clouddrove/ec2/aws/0.15.0"
environment = "test"
label_order = ["name", "environment"]
instance_count = 2
Expand Down
6 changes: 0 additions & 6 deletions _example/basic_example/example.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ module "vpc" {
version = "0.15.0"

name = "vpc"
repository = "https://registry.terraform.io/modules/clouddrove/vpc/aws/0.14.0"
environment = "test"
label_order = ["name", "environment"]

Expand All @@ -19,7 +18,6 @@ module "public_subnets" {
version = "0.15.0"

name = "public-subnet"
repository = "https://registry.terraform.io/modules/clouddrove/subnet/aws/0.14.0"
environment = "test"
label_order = ["name", "environment"]

Expand All @@ -35,7 +33,6 @@ module "http-https" {
source = "clouddrove/security-group/aws"
version = "0.15.0"
name = "http-https"
repository = "https://registry.terraform.io/modules/security-group/ec2/aws/0.14.0"
environment = "test"
label_order = ["name", "environment"]

Expand All @@ -48,7 +45,6 @@ module "ssh" {
source = "clouddrove/security-group/aws"
version = "0.15.0"
name = "ssh"
repository = "https://registry.terraform.io/modules/clouddrove/security-group/aws/0.14.0"
environment = "test"
label_order = ["name", "environment"]

Expand All @@ -62,7 +58,6 @@ module "iam-role" {
version = "0.15.0"

name = "iam-role"
repository = "https://registry.terraform.io/modules/clouddrove/iam-role/aws/0.14.0"
environment = "test"
label_order = ["name", "environment"]
assume_role_policy = data.aws_iam_policy_document.default.json
Expand Down Expand Up @@ -129,7 +124,6 @@ module "ec2" {
source = "./../../"

name = "ec2-instance"
repository = "https://registry.terraform.io/modules/clouddrove/ec2/aws/0.14.0"
environment = "test"
label_order = ["name", "environment"]

Expand Down
4 changes: 1 addition & 3 deletions _example/secure_example/example.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ module "public_subnets" {


name = "public-subnet"
repository = "https://registry.terraform.io/modules/clouddrove/subnet/aws/0.14.0"
environment = "test"
label_order = ["environment", "name"]

Expand Down Expand Up @@ -59,7 +58,7 @@ module "ssh" {

module "iam-role" {
source = "clouddrove/iam-role/aws"
version = "0.14.0"
version = "0.15.0"

name = "iam-role"
environment = "test"
Expand Down Expand Up @@ -138,7 +137,6 @@ module "ec2" {
source = "./../../"

name = "ec2-instance"
repository = "https://registry.terraform.io/modules/clouddrove/ec2/aws/0.14.0"
environment = "test"
label_order = ["environment", "name"]

Expand Down
2 changes: 1 addition & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ variable "name" {

variable "repository" {
type = string
default = "https://registry.terraform.io/modules/clouddrove/ec2/aws/0.14.0"
default = "https://github.com/clouddrove/terraform-aws-ec2"
description = "Terraform current module repo"

validation {
Expand Down

0 comments on commit 39e0c01

Please sign in to comment.