File tree Expand file tree Collapse file tree 3 files changed +18
-1
lines changed
Expand file tree Collapse file tree 3 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -195,6 +195,17 @@ module "api_gateway_disabled" {
195195 create = false
196196}
197197
198+ module "api_gateway_without_default_tags" {
199+ source = " ../../"
200+
201+ name = " ${ local . name } -no-default-tags"
202+ include_default_tags = false
203+
204+ tags = {
205+ CustomTag = " custom-value"
206+ }
207+ }
208+
198209# ###############################################################################
199210# Supporting Resources
200211# ###############################################################################
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ resource "aws_apigatewayv2_api" "this" {
4242 version = var. api_version
4343
4444 tags = merge (
45- { terraform-aws-modules = " apigateway-v2" },
45+ var . include_default_tags ? { terraform-aws-modules = " apigateway-v2" } : { },
4646 var. tags ,
4747 )
4848}
Original file line number Diff line number Diff line change @@ -4,6 +4,12 @@ variable "create" {
44 default = true
55}
66
7+ variable "include_default_tags" {
8+ description = " Set to false to not include the default tag in the tags map."
9+ type = bool
10+ default = true
11+ }
12+
713variable "tags" {
814 description = " A mapping of tags to assign to API gateway resources"
915 type = map (string )
You can’t perform that action at this time.
0 commit comments