Skip to content

Commit

Permalink
feat: updated github-action, terraform, aws version and fixed tflint …
Browse files Browse the repository at this point in the history
…issue (#59)
  • Loading branch information
theprashantyadav authored Oct 29, 2023
1 parent b66f555 commit e22fb36
Show file tree
Hide file tree
Showing 14 changed files with 66 additions and 65 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/auto_assignee.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
workflow_dispatch:
jobs:
assignee:
uses: clouddrove/github-shared-workflows/.github/workflows/auto_assignee.yml@master
uses: clouddrove/github-shared-workflows/.github/workflows/auto_assignee.yml@1.0.6
secrets:
GITHUB: ${{ secrets.GITHUB }}
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
workflow_dispatch:
jobs:
changelog:
uses: clouddrove/github-shared-workflows/.github/workflows/changelog.yml@master
uses: clouddrove/github-shared-workflows/.github/workflows/changelog.yml@1.0.6
secrets: inherit
with:
branch: 'master'
4 changes: 2 additions & 2 deletions .github/workflows/readme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
python-version: '3.x'

- name: 'create readme'
uses: 'clouddrove/github-actions@v9.0.2'
uses: 'clouddrove/github-actions@9.0.3'
with:
actions_subcommand: 'readme'
github_token: '${{ secrets.GITHUB }}'
Expand All @@ -35,7 +35,7 @@ jobs:
continue-on-error: true

- name: 'push readme'
uses: 'clouddrove/github-actions@v9.0.2'
uses: 'clouddrove/github-actions@9.0.3'
continue-on-error: true
with:
actions_subcommand: 'push'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/tf-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ on:
workflow_dispatch:
jobs:
memcached:
uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@master
uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@1.0.6
with:
working_directory: './_example/memcached/'
redis:
uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@master
uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@1.0.6
with:
working_directory: './_example/redis/'
redis-cluster:
uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@master
uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@1.0.6
with:
working_directory: './_example/redis-cluster/'
2 changes: 1 addition & 1 deletion .github/workflows/tflint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ on:
workflow_dispatch:
jobs:
tflint:
uses: clouddrove/test-tfsec/.github/workflows/tflint.yaml@master
uses: clouddrove/test-tfsec/.github/workflows/tflint.yaml@1.0.6
secrets:
GITHUB: ${{ secrets.GITHUB }}
2 changes: 1 addition & 1 deletion .github/workflows/tfsec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
workflow_dispatch:
jobs:
tfsec:
uses: clouddrove/github-shared-workflows/.github/workflows/tfsec.yml@master
uses: clouddrove/github-shared-workflows/.github/workflows/tfsec.yml@1.0.6
secrets: inherit
with:
working_directory: '.'
28 changes: 13 additions & 15 deletions _example/memcached/example.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,23 @@
## Provider block added, Use the Amazon Web Services (AWS) provider to interact with the many resources supported by AWS.
####----------------------------------------------------------------------------------
provider "aws" {
region = "eu-west-1"
region = local.region
}
locals {
name = "memcached"
environment = "test"
region = "eu-west-1"
}

####----------------------------------------------------------------------------------
## A VPC is a virtual network that closely resembles a traditional network that you'd operate in your own data center.
####----------------------------------------------------------------------------------
module "vpc" {
source = "clouddrove/vpc/aws"
version = "2.0.0"

name = "vpc"
environment = "test"
label_order = ["environment", "name"]

cidr_block = "10.0.0.0/16"
name = "${local.name}-vpc"
environment = local.environment
cidr_block = "10.0.0.0/16"
}

####----------------------------------------------------------------------------------
Expand All @@ -26,9 +28,8 @@ module "subnets" {
source = "clouddrove/subnet/aws"
version = "2.0.0"

name = "subnets"
environment = "test"
label_order = ["environment", "name"]
name = "${local.name}-subnets"
environment = local.environment
availability_zones = ["eu-west-1a", "eu-west-1b", "eu-west-1c"]
vpc_id = module.vpc.vpc_id
type = "public"
Expand All @@ -43,10 +44,8 @@ module "subnets" {
module "memcached" {
source = "./../../"

name = "memcached"
environment = "test"
label_order = ["name", "environment"]

name = local.name
environment = local.environment
####----------------------------------------------------------------------------------
## Below A security group controls the traffic that is allowed to reach and leave the resources that it is associated with.
####----------------------------------------------------------------------------------
Expand Down Expand Up @@ -79,5 +78,4 @@ module "memcached" {
route53_ttl = "300"
route53_type = "CNAME"
route53_zone_id = "SERFxxxx6XCsY9Lxxxxx"

}
6 changes: 3 additions & 3 deletions _example/memcached/versions.tf
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Terraform version
terraform {
required_version = ">= 1.5.0"
required_version = ">= 1.6.2"

required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.9.0"
version = ">= 5.22.0"
}
}
}
}
27 changes: 13 additions & 14 deletions _example/redis-cluster/example.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,23 @@
## Provider block added, Use the Amazon Web Services (AWS) provider to interact with the many resources supported by AWS.
####----------------------------------------------------------------------------------
provider "aws" {
region = "eu-west-1"
region = local.region
}
locals {
name = "redis-cluster"
environment = "test"
region = "eu-west-1"
}

####----------------------------------------------------------------------------------
## A VPC is a virtual network that closely resembles a traditional network that you'd operate in your own data center.
####----------------------------------------------------------------------------------
module "vpc" {
source = "clouddrove/vpc/aws"
version = "2.0.0"

name = "vpc"
environment = "test"
label_order = ["environment", "name"]

cidr_block = "10.0.0.0/16"
name = "${local.name}-vpc"
environment = local.environment
cidr_block = "10.0.0.0/16"
}

####----------------------------------------------------------------------------------
Expand All @@ -26,9 +28,8 @@ module "subnets" {
source = "clouddrove/subnet/aws"
version = "2.0.0"

name = "subnets"
environment = "test"
label_order = ["environment", "name"]
name = "${local.name}-subnets"
environment = local.environment
availability_zones = ["eu-west-1a", "eu-west-1b", "eu-west-1c"]
vpc_id = module.vpc.vpc_id
type = "public"
Expand All @@ -45,9 +46,8 @@ module "subnets" {
module "redis-cluster" {
source = "./../../"

name = "redis-cluster"
environment = "test"
label_order = ["environment", "name"]
name = local.name
environment = local.environment

###----------------------------------------------------------------------------------
# Below A security group controls the traffic that is allowed to reach and leave the resources that it is associated with.
Expand All @@ -71,7 +71,6 @@ module "redis-cluster" {
Application = "CloudDrove"
}


###----------------------------------------------------------------------------------
# will create ROUTE-53 for redis which will add the dns of the cluster.
###----------------------------------------------------------------------------------
Expand Down
6 changes: 3 additions & 3 deletions _example/redis-cluster/versions.tf
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Terraform version
terraform {
required_version = ">= 1.5.0"
required_version = ">= 1.6.2"

required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.9.0"
version = ">= 5.22.0"
}
}
}
}
26 changes: 13 additions & 13 deletions _example/redis/example.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,23 @@
## Provider block added, Use the Amazon Web Services (AWS) provider to interact with the many resources supported by AWS.
####----------------------------------------------------------------------------------
provider "aws" {
region = "eu-west-1"
region = local.region
}
locals {
name = "redis"
environment = "test"
region = "eu-west-1"
}

####----------------------------------------------------------------------------------
## A VPC is a virtual network that closely resembles a traditional network that you'd operate in your own data center.
####----------------------------------------------------------------------------------
module "vpc" {
source = "clouddrove/vpc/aws"
version = "2.0.0"

name = "vpc"
environment = "test"
label_order = ["environment", "name"]

cidr_block = "10.0.0.0/16"
name = "${local.name}-vpc"
environment = local.environment
cidr_block = "10.0.0.0/16"
}

####----------------------------------------------------------------------------------
Expand All @@ -26,9 +28,8 @@ module "subnets" {
source = "clouddrove/subnet/aws"
version = "2.0.0"

name = "subnets"
environment = "test"
label_order = ["environment", "name"]
name = "${local.name}-subnets"
environment = local.environment
availability_zones = ["eu-west-1a", "eu-west-1b", "eu-west-1c"]
vpc_id = module.vpc.vpc_id
type = "public"
Expand All @@ -46,10 +47,9 @@ module "subnets" {
module "redis" {
source = "./../../"

name = "redis"
environment = "test"
label_order = ["name", "environment"]

name = local.name
environment = local.environment
####----------------------------------------------------------------------------------
## Below A security group controls the traffic that is allowed to reach and leave the resources that it is associated with.
####----------------------------------------------------------------------------------
Expand Down
6 changes: 3 additions & 3 deletions _example/redis/versions.tf
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Terraform version
terraform {
required_version = ">= 1.5.0"
required_version = ">= 1.6.2"

required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.9.0"
version = ">= 5.22.0"
}
}
}
}
4 changes: 2 additions & 2 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ variable "environment" {

variable "label_order" {
type = list(any)
default = []
default = ["environment", "name"]
description = "Label order, e.g. `name`,`application`."
}

Expand Down Expand Up @@ -444,4 +444,4 @@ variable "special" {
type = bool
default = false

}
}
10 changes: 7 additions & 3 deletions versions.tf
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
# Terraform version
terraform {
required_version = ">= 1.5.0"
required_version = ">= 1.6.2"

required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.9.0"
version = ">= 5.22.0"
}
random = {
source = "hashicorp/random"
version = ">= 3.5.1"
}
}
}
}

0 comments on commit e22fb36

Please sign in to comment.