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”.
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.
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.