Data source for aws_networkmanager_core_network

We have a CloudWan being shared via RAM from another part of our organization. It seems like the only way for us to attach VPCs would be to use an aws_networkmanager_core_network data source to connect to the share and then aws_networkmanager_vpc_attachment passing the core_network_id.

But there doesn’t seem to be a “data” component for aws_networkmanager_core_network. Only “resource”.

Anyone else doing this? How?

There are additional data sources in the AWS CC Provider such as awscc_networkmanager_core_network and awscc_networkmanager_core_networks that you could use.

According to Shared AWS Cloud WAN core network, the shared core network should show up when you listed them (using the awscc_networkmanager_core_networks data source perhaps), so you can use it to get the core network ID. I can’t test this at the moment but hopefully you can figure out the rest.

Well, it works, sort of… and yet, not.

Installed the awscc provider, no problem.

The awscc_networkmanager_core_network data source only takes the resource id. The only way I have found to read any info at all about the shared core network is through the aws_ram_resource_share data source. Unfortunately it exposes the ARNs of any shared resources, but not the IDs.

Don’t have a way offhand to get from the ARN to the ID.

I will experiment with getting the ID from the awscc_networkmanager_core_networks data source.