Hey Guys. I am having difficulty to import a resou...
# general
i
Hey Guys. I am having difficulty to import a resource because I am interpreting wrong the error message. The resource is https://www.pulumi.com/registry/packages/aws-native/api-docs/ec2/eip/ and the error that return is:
ValidationException: Identifier ****** is not valid for identifier [/properties/PublicIp, /properties/AllocationId]
Do you guys have any idea how should I format the import key?
h
Can you post your code / command?
i
Oh, I found the way of importing. To people that could have this same doubt in the future, here is the snippet with the right use of import
Copy code
new native.ec2.Eip(
    `${serviceName}-MainVPCNatEIP1`,
    {
      tags: [
        {
          key: 'Name',
          value: `${serviceName}-MainVPCNatEIP1`,
        },
        {
          key: 'Service',
          value: serviceName,
        },
      ],
      domain: 'vpc',
      networkBorderGroup: 'us-east-1',
      publicIpv4Pool: 'amazon',
    },
    {
      ignoreChanges: ['tags', 'tagsAll'],
      import: JSON.stringify({
        AllocationId: 'eipalloc-xxxx',
        PublicIp: 'ip_here',
      }),
    },
  );
Besides that, I couldnt import because aws-native can't get all the properties of the Eip so I am now trying to use de Eip resource from aws package