-
Notifications
You must be signed in to change notification settings - Fork 156
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
Importing aws:ec2/routeTable:RouteTable produces resource with ipv6Cidr resource with empty string resulting in invalid CIDR address error #3986
Comments
The above shown data in CC: @t0yv0 |
Thank you for reporting this issue so clearly and thanks for the cited workaround! I'm adding the appropriate labels. This is indeed common theme of issues, our team will need to tackle as time permits. Adding to a tracking issue. |
I've created a repository here with a minimal configuration to reproduce this issue: https://github.com/tombee/pulumi-aws-issue-3986 Interestingly I found that it's only preventing preview and up actions when I add:
It also about failed validation during
|
Updated the main issue comment, since I don't believe this is a blocking issue if the trigger is only when I don't know enough about how import works with pulumi-aws and the terraform bridge to know if this could be a wider issue though where the import CLI is producing a state that won't pass validation. |
I just tried to reproduce this using the latest https://github.com/pulumi/pulumi-terraform-bridge/tree/master and it looks like it has been fixed. After the next bridge release we can pull in the new version and test it out to confirm. |
Tracking pulumi/pulumi-terraform-bridge#2314 in the bridge. |
@tombee the issue should now be fixed on the latest version. I tested with your repro and it was successful. |
Thank you @corymhall! That's great news.
…On Wed, Sep 11, 2024 at 1:33 PM Cory Hall ***@***.***> wrote:
Closed #3986 <#3986> as
completed.
—
Reply to this email directly, view it on GitHub
<#3986 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAOVJDUCE3DII4FIQH5GB3ZWA2CTAVCNFSM6AAAAABIHKCEGKVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJUGIYTKNBTGM4DOOA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Update: 28 May '24
It looks as though this specific issue is triggered when using
ignore_changes=["routes"]
after doingpulumi import
on a RouteTable resourceAccording to the docs, by omitting the routes input, this should then ignore route changes. I've tried this and it looks to be working okay for our use case.
For now it looks as though this isn't a blocking issue for importing Route Tables since there is a workaround, it's probably just not ideal that import is producing an invalid resource state that cannot be validated as per @tmeckel's reply: #3986 (comment)
Latest info and steps to repro are in: #3986 (comment)
What happened?
Not sure if this is a pulumi-aws or upstream Terraform problem!
When pulumi importing an AWS Route Table with AWS Classic (
aws:ec2/routeTable:RouteTable
), it appears that it also imports routes associated with the route table. The attributes on a route are set to "" if there is no value associated. I’m seeing an issue where "ipv6CidrBlock": "" then causes pulumi preview to complain that "" is not a valid CIDR block: invalid CIDR address.When I
pulumi state edit
and remove theipv6CidrBlock: "",
line from theaws:ec2/routeTable:RouteTable
resources the error goes away.If I also compare a
aws:ec2/routeTable:RouteTable
created bypulumi up
vs an imported resource viapulumi import
, the fields without values are all""
in the imported version and not present in thepulumi up
.Example
Section of state where the empty strings are being added to route attributes:
Output of
pulumi about
Additional context
Discussed this a little bit on Slack: https://pulumi-community.slack.com/archives/C84L4E3N1/p1715987354126929
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).
The text was updated successfully, but these errors were encountered: