Closed kavalerov closed 1 day ago
@graham-russell I was wondering if you had any time to look at this by any chance?
Hey @kavalerov - I just had a look. You need to import the app using it's app id rather than name.
I got the account id from the Ably dashboard - https://ably.com/accounts/12345/apps/12345/edit. There are other ways to do that as well.
Running import ably_app.app0 {APP_ID}
worked for me.
I'm currently using OpenTofu but Terraform will work the same way:
> tofu import ably_app.app0 XXXXXX 09:34:49
ably_app.app0: Importing from ID "XXXXXX"...
ably_app.app0: Import prepared!
Prepared ably_app for import
ably_app.app0: Refreshing state... [id=XXXXXX]
Import successful!
The resources that were imported are shown above. These resources are now in
your OpenTofu state and will henceforth be managed by OpenTofu.
Yes, this makes sense actually - I think we just need to update the instructions on the docs page - right now it is a bit misleading
Added PR to address this: https://github.com/ably/terraform-provider-ably/pull/186 , closing this issue for now.
I have prepared the following main.tf:
And then I do the following when try to import configuration (basically copied from the guide on Terraform website:
It looks like it tries to use name that I provided as appid, which is not correct.