diff --git a/README.md b/README.md
index 2f37273..dfe84a2 100644
--- a/README.md
+++ b/README.md
@@ -235,6 +235,7 @@ module "api_gateway" {
| [domain\_name\_ownership\_verification\_certificate\_arn](#input\_domain\_name\_ownership\_verification\_certificate\_arn) | ARN of the AWS-issued certificate used to validate custom domain ownership (when certificate\_arn is issued via an ACM Private CA or mutual\_tls\_authentication is configured with an ACM-imported certificate.) | `string` | `null` | no |
| [fail\_on\_warnings](#input\_fail\_on\_warnings) | Whether warnings should return an error while API Gateway is creating or updating the resource using an OpenAPI specification. Defaults to `false`. Applicable for HTTP APIs | `bool` | `null` | no |
| [hosted\_zone\_name](#input\_hosted\_zone\_name) | Optional domain name of the Hosted Zone where the domain should be created | `string` | `null` | no |
+| [include\_default\_tag](#input\_include\_default\_tag) | Set to false to not include the default tag in the tags map. | `bool` | `true` | no |
| [ip\_address\_type](#input\_ip\_address\_type) | The IP address types that can invoke the API. Valid values: ipv4, dualstack. Use ipv4 to allow only IPv4 addresses to invoke your API, or use dualstack to allow both IPv4 and IPv6 addresses to invoke your API. Defaults to ipv4. | `string` | `null` | no |
| [mutual\_tls\_authentication](#input\_mutual\_tls\_authentication) | The mutual TLS authentication configuration for the domain name | `map(string)` | `{}` | no |
| [name](#input\_name) | The name of the API. Must be less than or equal to 128 characters in length | `string` | `""` | no |
diff --git a/examples/complete-http/main.tf b/examples/complete-http/main.tf
index 07cd360..4b1246d 100644
--- a/examples/complete-http/main.tf
+++ b/examples/complete-http/main.tf
@@ -195,6 +195,17 @@ module "api_gateway_disabled" {
create = false
}
+module "api_gateway_without_default_tags" {
+ source = "../../"
+
+ name = "${local.name}-no-default-tags"
+ include_default_tag = false
+
+ tags = {
+ CustomTag = "custom-value"
+ }
+}
+
################################################################################
# Supporting Resources
################################################################################
diff --git a/main.tf b/main.tf
index 0e5c206..6f8e131 100644
--- a/main.tf
+++ b/main.tf
@@ -42,7 +42,7 @@ resource "aws_apigatewayv2_api" "this" {
version = var.api_version
tags = merge(
- { terraform-aws-modules = "apigateway-v2" },
+ var.include_default_tag ? { terraform-aws-modules = "apigateway-v2" } : {},
var.tags,
)
}
diff --git a/variables.tf b/variables.tf
index 3e2219d..d3665da 100644
--- a/variables.tf
+++ b/variables.tf
@@ -4,6 +4,12 @@ variable "create" {
default = true
}
+variable "include_default_tag" {
+ description = "Set to false to not include the default tag in the tags map."
+ type = bool
+ default = true
+}
+
variable "tags" {
description = "A mapping of tags to assign to API gateway resources"
type = map(string)