Shared Subnet Tagging through RAM in AWS Organization

I would like to create a shared subnet in AWS. I can deploy a shared subnet via terraform and RAM. However, the subnets that are shared with the new account are not managed by terraform. For example, I would like to tag the new subnets that go to the other account.
How can I do this?

account A: Shares subnet through RAM
account B: Receives shared subnet. I would like to manage these subnets w/o importing them.

Hi @dwayne

Take a look at Terraform AWS data sources. You can query the subnets created at account A and used them in Account B Terraform plans.



data "aws_subnet" "default" {
  vpc_id  = var.vpc_id
  filter {
    name   = "tag:Name"
    values = []

Call module, return subnet

#Zone: A, Env: PRO, Type: PUBLIC, Code: 00 aws_sn_za_pro_pub_00
module "aws_sn_za_pro_pub_00" {
  source  = "../modules/aws/data/network/subnet"
  vpc_id  =
  name    = var.base_net["aws_sn_za_pro_pub_00_name"]
#output "aws_sn_za_pro_pub_00" {value =}