-
Notifications
You must be signed in to change notification settings - Fork 948
terraform-import failure: Cannot import non-existent remote object #647
Copy link
Copy link
Closed
Labels
AuthenticationType: SupportAny questions, information, or general needs around the SDK or GitHub APIsAny questions, information, or general needs around the SDK or GitHub APIsr/repository
Description
Terraform Version
Terraform v0.14.3
provider "registry.terraform.io/hashicorp/github" { version = "4.1.0" }
Affected Resource(s)
- github_repository
Terraform Configuration Files
terraform {
required_version = "~> 0.14.0"
backend "remote" {
organization = "femiwiki"
workspaces {
name = "github"
}
}
required_providers {
github = {
source = "hashicorp/github"
version = "~> 4.0"
}
}
}
provider "github" {
organization = "femiwiki"
}resource "github_repository" "legunto" {
name = "legunto"
...
}Full configuration: https://github.com/femiwiki/infra/blob/50eb0673787a8cab88041876632e45b6df6a2a57/github/repo.tf#L465-L472
Debug Output
https://gist.github.com/lens0021/35d5e8997a389bfcd91fa6cc976d2fbc
Expected Behavior
A state which is created based on https://github.com/femiwiki/legunto is Imported successfully.
Actual Behavior
"Error: Cannot import non-existent remote object" is printed. See the debug output for details.
Steps to Reproduce
- Uncomment https://github.com/femiwiki/infra/blob/50eb0673787a8cab88041876632e45b6df6a2a57/github/repo.tf#L465-L472
terraform import github_repository.legunto legunto
Important Factoids
Our team is using Terraform Cloud (https://app.terraform.io/).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
AuthenticationType: SupportAny questions, information, or general needs around the SDK or GitHub APIsAny questions, information, or general needs around the SDK or GitHub APIsr/repository