cloudposse / terraform-aws-dynamic-subnets

Terraform module for public and private subnets provisioning in existing VPC
https://cloudposse.com/accelerate
Apache License 2.0
197 stars 167 forks source link

RAM share subnets or ARN output #171

Closed HanwhaARudolph closed 1 year ago

HanwhaARudolph commented 2 years ago

Describe the Feature

Add ARN as an output or enable RAM sharing in the module.

Expected Behavior

Something like this would be great: ram_share_principals = [ou,account,etc]

Use Case

When using a centralized network account and doing ram shares out to child accounts, this module requires a decent amount of work to do something that could be done either in the module or provide the ARN for the subnets to allow for creating RAM share outside the module.

Describe Ideal Solution

Ideal solution would use aws_ram_resource_share, aws_ram_resource_association and aws_ram_principal_association

Alternatives Considered

Easiest solution/implementation to allow people to customize:

output "public_subnet_arns" {
  description = "ARNs of the created public subnets"
  value       = aws_subnet.public.*.arn
}

output "private_subnet_arns" {
  description = "ARNs of the created private subnets"
  value       = aws_subnet.private.*.arn
}

Additional Context

Add any other context or screenshots about the feature request here.