Skip to content

Commit

Permalink
Merge pull request openshift-cs#5 from paulczar/main
Browse files Browse the repository at this point in the history
allow user to specify extra tags
  • Loading branch information
wgordon17 authored Jan 12, 2024
2 parents 3055ae6 + f05cadd commit fd892e3
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 11 deletions.
25 changes: 14 additions & 11 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -129,21 +129,24 @@ module "vpc" {
private_subnets = local.all_subnets[0]
public_subnets = local.all_subnets[1]
# Tags defined per https://repost.aws/knowledge-center/eks-vpc-subnet-discovery
private_subnet_tags = {
"kubernetes.io/role/internal-elb" = "1"
}
public_subnet_tags = {
"kubernetes.io/role/elb" = "1"
}
private_subnet_tags = merge(var.extra_tags ,
{
"kubernetes.io/role/internal-elb" = "1"
})
public_subnet_tags = merge(var.extra_tags ,
{
"kubernetes.io/role/elb" = "1"
})

enable_nat_gateway = true
enable_dns_hostnames = true
enable_dns_support = true
manage_default_security_group = false

tags = {
Terraform = "true"
service = "ROSA"
cluster_name = var.cluster_name
}
tags = merge(var.extra_tags,
{
Terraform = "true"
service = "ROSA"
cluster_name = var.cluster_name
})
}
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,9 @@ variable "single_az_only" {
type = bool
default = true
}

variable "extra_tags" {
description = "Extra tags to apply to AWS resources"
type = map
default = {}
}

0 comments on commit fd892e3

Please sign in to comment.