Skip to content

Following instructions for importing configuration doesn't work #181

Closed
@kavalerov

Description

@kavalerov

I have prepared the following main.tf:

terraform {

  required_providers {
    ably = {
      source = "ably/ably"
    }
  }
}

provider "ably" {
  token = "control api token"
}

resource "ably_app" "app0" {
  name   = "prod"
  status = "enabled"
}

And then I do the following when try to import configuration (basically copied from the guide on Terraform website:

image

❯ terraform import ably_app.app0 prod
ably_app.app0: Importing from ID "prod"...
ably_app.app0: Import prepared!
  Prepared ably_app for import
ably_app.app0: Refreshing state... [id=prod]
╷
│ Error: Cannot import non-existent remote object
│
│ While attempting to import an existing object to "ably_app.app0", the provider detected that no object exists with the given id. Only pre-existing objects can be imported; check that the id is correct and that it is associated with the provider's
│ configured region or endpoint, or use "terraform apply" to create a new remote object for this resource.

It looks like it tries to use name that I provided as appid, which is not correct.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions