Skip to content

Commit

Permalink
feat: update-python-version-and-user-module
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Freedman committed Nov 17, 2022
1 parent aaa8c0c commit 21843c2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
6 changes: 3 additions & 3 deletions modules/custom_identity_provider/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,16 @@ resource "aws_lambda_function" "this_lambda" {
function_name = "TransferCustomIdentityProviderCredentialLookup"
handler = "lambda.lambda_handler"
role = coalesce(concat(aws_iam_role.this_lambda.*.arn, [])[0], var.lambda_role_arn)
runtime = "python3.7"
runtime = "python3.9"
description = "A function to lookup and return user data from AWS Secrets Manager."
tags = var.tags
filename = "lib/lambda.zip"
source_code_hash = filebase64sha256("lib/lambda.zip")

environment {
variables = {
SECRET_BASE_PATH = var.secret_base_path
SecretsManagerRegion = data.aws_region.current.name
SECRET_BASE_PATH = var.secret_base_path
SecretsManagerRegion = data.aws_region.current.name
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion modules/transfer-user/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ locals {


resource "aws_transfer_user" "this" {
count = var.create_transfer_user ? 1 : 0
role = var.create_iam_role ? element(concat(aws_iam_role.this.*.arn, [""]), 0) : var.iam_role_arn
server_id = var.transfer_server_id
user_name = var.user_name
Expand All @@ -26,7 +27,7 @@ resource "aws_transfer_ssh_key" "ssh_key" {
count = var.add_transfer_ssh_keys ? length(local.all_key_bodies) : 0
body = element(concat(local.all_key_bodies, [""]), count.index)
server_id = var.transfer_server_id
user_name = aws_transfer_user.this.user_name
user_name = aws_transfer_user.this[0].user_name
}

resource "aws_iam_role" "this" {
Expand Down
6 changes: 6 additions & 0 deletions modules/transfer-user/variables.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
variable "transfer_server_id" {
description = "ID of the AWs Transfer Server"
default = ""
}

variable "user_name" {
Expand Down Expand Up @@ -65,3 +66,8 @@ variable "home_directory_type" {
default = "PATH"
type = string
}

variable "create_transfer_user" {
description = "Create an transfer user"
default = true
}

0 comments on commit 21843c2

Please sign in to comment.