Skip to content

Commit

Permalink
Update acm and github action version (#50)
Browse files Browse the repository at this point in the history
* feat: update gitinnore and acm version

* feat: update github-action version

* feat: update tf version

* feat: updated fail name

---------

Co-authored-by: anmolnagpal <anmol@clouddrove.com>
  • Loading branch information
theprashantyadav and anmolnagpal authored Oct 13, 2023
1 parent 2fabccc commit ccac4dd
Show file tree
Hide file tree
Showing 14 changed files with 227 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/auto_assignee.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,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'
8 changes: 4 additions & 4 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:
alb:
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/alb/'
nlb:
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/nlb/'
clb:
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/clb/'
working_directory: './_example/clb/'
4 changes: 2 additions & 2 deletions .github/workflows/tflint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ on:
workflow_dispatch:
jobs:
tf-lint:
uses: clouddrove/github-shared-workflows/.github/workflows/tf-lint.yml@master
uses: clouddrove/github-shared-workflows/.github/workflows/tf-lint.yml@1.0.6
secrets:
GITHUB: ${{ secrets.GITHUB }}
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: '.'
207 changes: 205 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,210 @@
# ignored files
*~

# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*

# KDE directory preferences
.directory

# Linux trash folder which might appear on any partition or disk
.Trash-*

# .nfs files are created when an open file is removed but is still being accessed
.nfs*
### Eclipse template

.metadata
bin/
tmp/
*.tmp
*.bak
*.swp
*~.nib
local.properties
.settings/
.loadpath
.recommenders

# External tool builders
.externalToolBuilders/

# Locally stored "Eclipse launch configurations"
*.launch

# PyDev specific (Python IDE for Eclipse)
*.pydevproject

# CDT-specific (C/C++ Development Tooling)
.cproject

# Java annotation processor (APT)
.factorypath

# PDT-specific (PHP Development Tools)
.buildpath

# sbteclipse plugin
.target

# Tern plugin
.tern-project

# TeXlipse plugin
.texlipse

# STS (Spring Tool Suite)
.springBeans

# Code Recommenders
.recommenders/

# Scala IDE specific (Scala & Java development for Eclipse)
.cache-main
.scala_dependencies
.worksheet
### Windows template
# Windows thumbnail cache files
Thumbs.db
ehthumbs.db
ehthumbs_vista.db

# Dump file
*.stackdump

# Folder config file
[Dd]esktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msm
*.msp

# Windows shortcuts
*.lnk
### Ansible template
*.retry
### macOS template
# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
### Archives template
# It's better to unpack these files and commit the raw source because
# git has its own built in compression methods.
*.7z
*.jar
*.rar
*.zip
*.gz
*.tgz
*.bzip
*.bz2
*.xz
*.lzma
*.cab

# Packing-only formats
*.iso
*.tar

# Package management formats
*.dmg
*.xpi
*.gem
*.egg
*.deb
*.rpm
*.msi
*.msm
*.msp
### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

/.idea/
# User-specific stuff:
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/dictionaries

# Sensitive or high-churn files:
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.xml
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml

# Gradle:
.idea/**/gradle.xml
.idea/**/libraries

# CMake
cmake-build-debug/

# Mongo Explorer plugin:
.idea/**/mongoSettings.xml

## File-based project format:
*.iws

## Plugin-specific files:

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/
# User-specific stuff:
.idea/*
# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# TFstste
*.tfstate*

deployment/_logs/ansible-log.json
deployment/_logs/ansible-log.log
deployment/_logs/facts/*
deployment/_logs/retry/*
_app/*
ansible-log.json
.terraform
terraform.tfstate

*.tfstate
*.tfstate.backup
.terraform
.idea
*.iml
*.terraform.lock.hcl
*.lock.hcl
2 changes: 1 addition & 1 deletion _example/alb/example.tf
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ module "ec2" {

module "acm" {
source = "clouddrove/acm/aws"
version = "1.4.0"
version = "1.4.1"
name = local.name
environment = local.environment

Expand Down
6 changes: 3 additions & 3 deletions _example/alb/versions.tf
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Terraform version
terraform {
required_version = ">= 1.5.5"
required_version = ">= 1.6.1"

required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.13.1"
version = ">= 5.20.1"
}
}
}
}
4 changes: 2 additions & 2 deletions _example/clb/versions.tf
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Terraform version
terraform {
required_version = ">= 1.5.5"
required_version = ">= 1.6.1"

required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.13.1"
version = ">= 5.20.1"
}
}
}
2 changes: 1 addition & 1 deletion _example/nlb/exampe.tf → _example/nlb/example.tf
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ module "ec2" {

module "acm" {
source = "clouddrove/acm/aws"
version = "1.4.0"
version = "1.4.1"
name = local.name
environment = local.environment

Expand Down
4 changes: 2 additions & 2 deletions _example/nlb/versions.tf
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Terraform version
terraform {
required_version = ">= 1.5.5"
required_version = ">= 1.6.1"

required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.13.1"
version = ">= 5.20.1"
}
}
}
6 changes: 2 additions & 4 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -286,9 +286,7 @@ resource "aws_lb_target_group_attachment" "attachment" {
}

locals {
arns = aws_lb_target_group.main.*.arn
targets = range(var.instance_count)
ports = [for d in var.target_groups : d.backend_port]
# Nested loop over both lists, and flatten the result.
arns_targets = distinct(flatten([
for arn_key, arn in var.target_groups : [
Expand All @@ -304,8 +302,8 @@ locals {
resource "aws_lb_target_group_attachment" "nattachment" {
for_each = var.load_balancer_type == "network" && var.enable && var.with_target_group ? { for k, v in local.arns_targets : k => v } : {}

target_group_arn = element(aws_lb_target_group.main.*.arn, each.value.key) #local.arns_targets[count.index].arn
target_id = var.target_id[each.value.target] #each.value.target
target_group_arn = element(aws_lb_target_group.main[*].arn, each.value.key) #local.arns_targets[count.index].arn
target_id = var.target_id[each.value.target] #each.value.target
port = each.value.port
}

Expand Down
4 changes: 0 additions & 4 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ variable "repository" {
}
}


variable "environment" {
type = string
default = "test"
Expand Down Expand Up @@ -58,7 +57,6 @@ variable "load_balancer_type" {
description = "The type of load balancer to create. Possible values are application or network. The default value is application."
}


variable "subnet_mapping" {
default = []
type = list(map(string))
Expand Down Expand Up @@ -131,7 +129,6 @@ variable "listener_type" {
description = "The type of routing action. Valid values are forward, redirect, fixed-response, authenticate-cognito and authenticate-oidc."
}


variable "listener_certificate_arn" {
type = string
sensitive = true
Expand Down Expand Up @@ -198,7 +195,6 @@ variable "load_balancer_update_timeout" {
description = "Timeout value when updating the ALB."
}


variable "http_listener_type" {
type = string
default = "redirect"
Expand Down
4 changes: 2 additions & 2 deletions versions.tf
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Terraform version
terraform {
required_version = ">= 1.5.5"
required_version = ">= 1.6.1"

required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.13.1"
version = ">= 5.20.1"
}
}
}

0 comments on commit ccac4dd

Please sign in to comment.