cuddly-orange-36960
05/17/2024, 11:09 PMaws: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
. Is there a workaround to get this working, without manually removing those ipv6CidrBlock attributes from the state?big-architect-71258
05/18/2024, 7:57 PMcuddly-orange-36960
05/24/2024, 9:33 AMcuddly-orange-36960
05/24/2024, 9:39 AMtry:
.. try to import existing resource ..
catch all exceptions:
.. create new resource ..
cuddly-orange-36960
05/24/2024, 9:39 AMbig-architect-71258
05/24/2024, 9:49 AMpulumi/pulumi
repo which is around the fact that Pulumi should do this "detection" automatically and even more that you can ensure that a resource is only created once even if the code creates it multiple times. Didn't save the ID though and I couldn't find it by a quick search.cuddly-orange-36960
05/24/2024, 9:50 AMcuddly-orange-36960
05/24/2024, 9:51 AMpulumi import
CLI in general.big-architect-71258
05/24/2024, 9:52 AMcuddly-orange-36960
05/24/2024, 9:53 AMcuddly-orange-36960
05/24/2024, 9:53 AMpulumi import
CLI properly. I have to run a provider initialisation only stack, then grab the URNs.. put those into the nameTable
in the JSON file.cuddly-orange-36960
05/24/2024, 9:54 AMpulumi import
codegen (I don’t actually want the code it generates, just the state)cuddly-orange-36960
05/24/2024, 9:54 AMcuddly-orange-36960
05/24/2024, 9:55 AMbig-architect-71258
05/24/2024, 9:56 AMpulumi import
either.big-architect-71258
05/24/2024, 9:57 AMpulumi pre
to create various JSON import files.cuddly-orange-36960
05/24/2024, 9:59 AMcuddly-orange-36960
05/24/2024, 10:01 AMbig-architect-71258
05/24/2024, 10:04 AMcuddly-orange-36960
05/24/2024, 10:05 AMbig-architect-71258
05/24/2024, 10:15 AMroutes
not set) in contrast to []
which forcefully clears all existing routes. All this back and forth might cause issues while importing the resource, even when importing using Terraform.
https://github.com/hashicorp/terraform-provider-aws/blob/main/internal/service/ec2/vpc_route_table.go
https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route_tablecuddly-orange-36960
05/24/2024, 10:18 AM""
values for unused attributes.. whereas a newly created resource with Pulumi just omits the unused attributes.cuddly-orange-36960
05/24/2024, 10:19 AMpulumi state edit
and remove the ipv6Cidr: ""
line, it stops producing the "": Invalid CIDR
error.cuddly-orange-36960
05/24/2024, 10:31 AMcuddly-orange-36960
05/24/2024, 10:31 AMbig-architect-71258
05/24/2024, 11:32 AMCreated an issue, thanks for the discussion and ideas on this!@cuddly-orange-36960 My pleasure!
cuddly-orange-36960
05/24/2024, 6:50 PMcuddly-orange-36960
05/28/2024, 10:55 AMignore_changes=["routes']
on the RouteTable resource for some reason.. which I believe is unnecessary from what I read in the docs.cuddly-orange-36960
05/28/2024, 10:55 AMcuddly-orange-36960
05/28/2024, 10:57 AM