Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VPC Ipv6CidrBlocks are not immediately populated #1798

Open
corymhall opened this issue Nov 4, 2024 · 0 comments
Open

VPC Ipv6CidrBlocks are not immediately populated #1798

corymhall opened this issue Nov 4, 2024 · 0 comments
Labels
kind/bug Some behavior is incorrect or out of spec

Comments

@corymhall
Copy link
Contributor

What happened?

In order to create a VPC with a Ipv6 CIDR block you have to use a separate AWS::EC2::VPCCidrBlock resource. Once the VPCCidrBlock resource is created then you are able to perform a cloudcontrol get-resource request on the Vpc resource and the ipv6CidrBlocks attribute will be populated. Unfortunately this provider cannot handle that scenario. The actual flow looks something like this:

  1. Create aws-native.ec2.Vpc
  2. Perform get-resource to populate attributes - ipv6CidrBlocks is empty
  3. Create aws-native.ec2.VpcCidrBlock
  4. Some other resource references Vpc.ipv6CidrBlocks which is empty because we don't do another get-resource on the Vpc after creating the VpcCidrBlock

Users will have to always remember to access the CidrBlock from the correct VpcCidrBlock resource.

Example

const vpc = new aws.ec2.Vpc('vpc', {
    cidrBlock,
});

const ipv6Cidr = new aws.ec2.VpcCidrBlock('ipv6Cidr', {
    vpcId: vpc.vpcId,
    amazonProvidedIpv6CidrBlock: true,
});

export const ipv6cidr = vpc.ipv6CidrBlocks; // will be empty.

Output of pulumi about

N/A

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

@corymhall corymhall added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team and removed needs-triage Needs attention from the triage team labels Nov 4, 2024
corymhall added a commit to pulumi/pulumi-cdk that referenced this issue Nov 4, 2024
Depends on pulumi/pulumi-aws-native#1797

Because of pulumi/pulumi-aws-native#1798 we
need to add a special case for Ipv6 cidr blocks that are added to the
VPC via a `VPCCidrBlock` resource.

This PR adds special handling where we track both the `Vpc` and the
`VpcCidrBlock` resource and swap any references.
corymhall added a commit to pulumi/pulumi-cdk that referenced this issue Nov 7, 2024
Depends on pulumi/pulumi-aws-native#1797

Because of pulumi/pulumi-aws-native#1798 we
need to add a special case for Ipv6 cidr blocks that are added to the
VPC via a `VPCCidrBlock` resource.

This PR adds special handling where we track both the `Vpc` and the
`VpcCidrBlock` resource and swap any references.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Some behavior is incorrect or out of spec
Projects
None yet
Development

No branches or pull requests

1 participant