0

While experimenting with AWS CDK for Python I do not seem to be able to extract a tag value from a CfnResource.

Example VPC (I understand that the core focus is on ec2.VPC, but it is just an experiment):

vpc = ec2.CfnVPC(stack, 
              id = "vpc-id",
              cidr_block="10.1.0.0/16",
              enable_dns_hostnames=True,
              enable_dns_support=True,
              tags=[core.CfnTag(key="Name", value="vpc-name")])

How can I get to the value of the “Name” tag through CfnVPC construct?

I have tried vpc.tags but it seems to give me TagManager that does not expose a get tag interface.

What am I missing?