Skip to content

Commit

Permalink
Merge pull request #36 from nitrocode/ram_share_tags
Browse files Browse the repository at this point in the history
Add tags to ram share
  • Loading branch information
drewmullen authored Jun 6, 2022
2 parents f77b9b5 + 014ccab commit cb7aafc
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions modules/sub_pool/main.tf
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
locals {
description = var.pool_config.description == null ? var.implied_description : var.pool_config.description

name = var.pool_config.name == null ? var.implied_name : var.pool_config.name

tags = merge(var.pool_config.tags, {
Name = local.name }
)

ram_share_enabled = try(length(var.pool_config.ram_share_principals), 0) > 0
}

Expand All @@ -21,8 +24,7 @@ resource "aws_vpc_ipam_pool" "sub" {
aws_service = var.pool_config.aws_service
publicly_advertisable = var.pool_config.publicly_advertisable

tags = merge(var.pool_config.tags,
{ Name = local.name })
tags = local.tags
}

resource "aws_vpc_ipam_pool_cidr" "sub" {
Expand All @@ -44,6 +46,8 @@ resource "aws_ram_resource_share" "sub" {
count = local.ram_share_enabled ? 1 : 0

name = replace(var.implied_description, "/", "-")

tags = local.tags
}

resource "aws_ram_resource_association" "sub" {
Expand Down

0 comments on commit cb7aafc

Please sign in to comment.