Skip to content

Commit a82bf91

Browse files
committed
Removed environment var from module
1 parent 7a3f5a4 commit a82bf91

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

main.tf

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
locals {
2-
service_name = format("service_%s_%s", var.name, var.environment)
2+
service_name = format("service_%s", var.name)
33
}
44

55
resource "aws_iam_role" "iam_for_lambda" {
@@ -33,7 +33,6 @@ resource "aws_lambda_function" "service_lambda" {
3333
environment {
3434
variables = merge({
3535
SERVICE = var.name
36-
ENVIRONMENT : var.environment
3736
}, var.environment_variables)
3837
}
3938

@@ -142,7 +141,7 @@ resource "aws_apigatewayv2_api" "service_apig" {
142141

143142
}
144143

145-
tags = merge(var.tags, { Name = local.service_name, Environment = var.environment })
144+
tags = merge(var.tags, { Name = local.service_name })
146145

147146
}
148147

variables.tf

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,6 @@ variable "lambda_image" {
1818
description = "URI of your container image for this function"
1919
}
2020

21-
variable "environment" {
22-
type = string
23-
description = "Prefix environment to resources identifiers/names created by this module"
24-
}
25-
2621
variable "environment_variables" {
2722
default = {}
2823
type = map(string)

0 commit comments

Comments
 (0)