https://pulumi.com logo
#general
Title
# general
a

adamant-dress-73325

08/15/2019, 5:04 PM
Hi, We are trying to use the import feature to import a AWS RouteTableAssociation resource, but are getting the following error:
Copy code
warning: A new version of Pulumi is available. To upgrade from version '0.17.28' to '1.0.0-beta.2', run 
   $ brew upgrade pulumi
or visit <https://pulumi.com/docs/reference/install/> for manual instructions and release notes.
Previewing update (peopleticker/qa):

     Type                              Name             Plan       Info
     pulumi:pulumi:Stack               peopleticker-qa             1 error
 =   └─ aws:ec2:RouteTableAssociation  tf-qa-front-0    import     1 error
 
Diagnostics:
  aws:ec2:RouteTableAssociation (tf-qa-front-0):
    error: Preview failed: resource 'subnet-098fd854/rtb-ac9d63d0' does not exist
 
  pulumi:pulumi:Stack (peopleticker-qa):
    error: preview failed
We are pretty sure the ID of that resource exists and we are using latest pulumi-aws package which has the provider code from terraform to import such a resource.
b

best-xylophone-83824

08/15/2019, 5:07 PM
a

adamant-dress-73325

08/15/2019, 5:16 PM
Perhaps it is a case of not fitting the pulumi URN abstraction, but terraform does seem to support importing such a thing
b

best-xylophone-83824

08/15/2019, 5:19 PM
that is a very recent update, could it be that pulumi-aws wasn't updated yet to pull new version in?
a

adamant-dress-73325

08/15/2019, 5:20 PM
We also tried pulling the id from terraform state file, but it just points us to use the original method we tried basically.
Copy code
warning: A new version of Pulumi is available. To upgrade from version '0.17.28' to '1.0.0-beta.2', run 
   $ brew upgrade pulumi
or visit <https://pulumi.com/docs/reference/install/> for manual instructions and release notes.
Previewing update (peopleticker/qa):

     Type                              Name             Plan       Info
     pulumi:pulumi:Stack               peopleticker-qa             2 errors
 =   └─ aws:ec2:RouteTableAssociation  tf-qa-front-0    import     1 error
 
Diagnostics:
  aws:ec2:RouteTableAssociation (tf-qa-front-0):
    error: Preview failed: importing rtbassoc-a87794d7: Wrong format for import: rtbassoc-a87794d7. Use 'subnet ID/route table ID'
@best-xylophone-83824 Nah still doesn't work, we checked that pulumi aws is using the right provider version
w

white-balloon-205

08/15/2019, 8:06 PM
Opened https://github.com/pulumi/pulumi-aws/issues/708. I can repro this as well - and I'm not exactly clear on why it doesn't work (and whether its a Pulumi issue or an upstream provider issue).
👍 1
2 Views