Skip to content

Commit b962617

Browse files
feat: update tf.checks step name and tf and aws version (#37)
* feat: update tf.checks step name and tf and aws version * feat: update tf.checks step name and tf and aws version * feat: update tf.checks step name and tf and aws version * feat: update tf.checks step name and tf and aws version --------- Co-authored-by: anmolnagpal <[email protected]>
1 parent 1eac805 commit b962617

File tree

12 files changed

+15
-67
lines changed

12 files changed

+15
-67
lines changed

.github/workflows/automerge.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ jobs:
88
secrets:
99
GITHUB: ${{ secrets.GITHUB }}
1010
with:
11-
tfcheck: 'example / Evaluate Terraform versions (1.5.0, ./_example/public)'
11+
tfcheck: 'public / Check code format'
1212
...

.github/workflows/tf-checks.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@ on:
55
pull_request:
66
workflow_dispatch:
77
jobs:
8-
example:
8+
public:
99
uses: clouddrove/github-shared-workflows/.github/workflows/[email protected]
1010
with:
1111
working_directory: './_example/public'
12+
vpc:
13+
uses: clouddrove/github-shared-workflows/.github/workflows/[email protected]
14+
with:
15+
working_directory: './_example/vpc'

.github/workflows/tflint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
pull_request:
66
workflow_dispatch:
77
jobs:
8-
tflint:
8+
tf-lint:
99
uses: clouddrove/github-shared-workflows/.github/workflows/[email protected]
1010
secrets:
11-
GITHUB: ${{ secrets.GITHUB }}
11+
GITHUB: ${{ secrets.GITHUB }}

_example/public/example.tf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ module "sftp" {
3131
label_order = ["environment", "name"]
3232
enable_sftp = true
3333
s3_bucket_name = module.s3_bucket.id
34-
endpoint_type = "PUBLIC"
3534
workflow_details = {
3635
on_upload = {
3736
execution_role = "arn:aws:iam::1234567890:role/test-sftp-transfer-role"

_example/public/variables.tf

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +0,0 @@
1-
variable "sftp_users" {
2-
type = list(object({
3-
username = string
4-
password = string
5-
home_dir = string
6-
}))
7-
default = []
8-
}
9-
10-
variable "eip_enabled" {
11-
type = bool
12-
description = "Whether to provision and attach an Elastic IP to be used as the SFTP endpoint. An EIP will be provisioned per subnet."
13-
default = false
14-
}

_example/public/versions.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Terraform version
22
terraform {
3-
required_version = ">= 1.5.0"
3+
required_version = ">= 1.6.6"
44

55
required_providers {
66
aws = {
77
source = "hashicorp/aws"
8-
version = ">= 5.9.0"
8+
version = ">= 5.31.0"
99
}
1010
}
1111
}

_example/vpc/example.tf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ module "sftp" {
120120
label_order = ["environment", "name"]
121121
eip_enabled = false
122122
s3_bucket_name = module.s3_bucket.id
123-
sftp_users = var.sftp_users
124123
subnet_ids = module.subnets.private_subnet_id
125124
vpc_id = module.vpc.vpc_id
126125
restricted_home = true

_example/vpc/variables.tf

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +0,0 @@
1-
variable "sftp_users" {
2-
type = list(object({
3-
username = string
4-
password = string
5-
home_dir = string
6-
}))
7-
default = []
8-
}
9-
10-
variable "eip_enabled" {
11-
type = bool
12-
description = "Whether to provision and attach an Elastic IP to be used as the SFTP endpoint. An EIP will be provisioned per subnet."
13-
default = false
14-
}
15-
16-
17-
variable "workflow_details" {
18-
type = object({
19-
on_upload = object({
20-
execution_role = string
21-
workflow_id = string
22-
})
23-
})
24-
description = "Workflow details for triggering the execution on file upload."
25-
default = {
26-
on_upload = {
27-
execution_role = null
28-
workflow_id = null
29-
}
30-
}
31-
}

_example/vpc/versions.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Terraform version
22
terraform {
3-
required_version = ">= 1.5.0"
3+
required_version = ">= 1.6.6"
44

55
required_providers {
66
aws = {
77
source = "hashicorp/aws"
8-
version = ">= 5.9.0"
8+
version = ">= 5.31.0"
99
}
1010
}
1111
}

main.tf

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,9 @@ module "labels" {
2222
# LOCALS
2323
##----------------------------------------------------------------------------------
2424
locals {
25-
count = var.enabled
2625
s3_arn_prefix = "arn:${one(data.aws_partition.default[*].partition)}:s3:::"
2726
is_vpc = var.vpc_id != null
2827

29-
user_names = length(var.sftp_users) > 0 ? [for user in var.sftp_users : user.user_name] : []
30-
3128
user_names_map = length(var.sftp_users) > 0 ? {
3229
for user in var.sftp_users :
3330
user.user_name => merge(user, {
@@ -201,7 +198,7 @@ resource "aws_transfer_server" "transfer_server" {
201198
subnet_ids = var.subnet_ids
202199
security_group_ids = var.vpc_security_group_ids
203200
vpc_id = var.vpc_id
204-
address_allocation_ids = var.eip_enabled ? aws_eip.sftp.*.id : var.address_allocation_ids
201+
address_allocation_ids = var.eip_enabled ? aws_eip.sftp[*].id : var.address_allocation_ids
205202
}
206203
}
207204
lifecycle {

0 commit comments

Comments
 (0)