I am trying to import some of my ecr repositories into terraform. However, when I plan them, it seems like terraform wants to create them.
I followed this method: previously wrote the configuration (ecr.tf). Did
terraform import aws_ecr_repository.ecr-blabla blabla
. Then terraform plan -out=plan.txt
.
Terraform version: v0.10.8
ecr.tf:
resource "aws_ecr_repository" "ecr-blabla" {
name = "blabla"
}
terraform plan -out=plan.txt
aws_ecr_repository.ecr-blabla
id: <computed>
arn: <computed>
image_tag_mutability: "MUTABLE"
name: "blabla"
registry_id: <computed>
repository_url: <computed>
Result of the import:
terraform import aws_ecr_repository.ecr-blabla blabla
aws_ecr_repository.ecr-blabla: Importing from ID "blabla"...
aws_ecr_repository.ecr-blabla: Import complete!
Imported aws_ecr_repository (ID: blabla)
aws_ecr_repository.ecr-blabla: Refreshing state... (ID: blabla)
Import successful!
I would like to basically leave those resources alone (except if I want to destroy them, but that's not the question here). I didn't do anything particlular for those repositories. They are in use and and I would like to not have to delete them and/or delete them.