@@ -28,15 +28,6 @@ locals {
2828 {% for subnet in subnets -%} "{{ subnet }}",
2929 {% endfor %} ]
3030{% endif %}
31- tags = merge(
32- {
33- "generated_by" = "picofun"
34- },{% if tags |length > 0 %}
35- { {% for tag in tags -%}
36- {{ tag }} = "{{ tags[tag] }}",
37- {% endfor %} },{% - endif %}
38- var.tags
39- )
4031}
4132{% if subnets |length > 0 %}
4233data "aws_subnet" "this" {
@@ -50,7 +41,7 @@ resource "aws_security_group" "lambda" {
5041 description = "Security group for pf-{{ namespace }} lambda functions"
5142 vpc_id = data.aws_subnet.this[local.subnet_ids[0]].vpc_id
5243
53- tags = local .tags
44+ tags = var .tags
5445}
5546{% endif %}
5647resource "null_resource" "layer" {
@@ -121,7 +112,7 @@ resource "aws_lambda_function" "this" {
121112 mode = "Active"
122113 }
123114{% endif %}
124- tags = local .tags
115+ tags = var .tags
125116}
126117
127118resource "aws_iam_role" "lambda" {
@@ -130,7 +121,7 @@ resource "aws_iam_role" "lambda" {
130121 assume_role_policy = data.aws_iam_policy_document.lambda_assume_role.json
131122 permissions_boundary = {{ '"{}"'.format(role_permissions_boundary) if role_permissions_boundary else "null" }}
132123
133- tags = local .tags
124+ tags = var .tags
134125}
135126
136127data "aws_iam_policy_document" "lambda_assume_role" {
@@ -168,7 +159,7 @@ resource "aws_cloudwatch_log_group" "lambda" {
168159
169160 retention_in_days = 14
170161
171- tags = local .tags
162+ tags = var .tags
172163}
173164
174165output "lambda_function_arns" {
0 commit comments