Terraform v0.11.11
We have a quite big AWS setup created with Terraform. Different regions are applied separately, and that is why we have most of the things in modules which are imported like this:
module "assets" {
source = "../modules/aws-assets"
environment = "${var.environment}"
upload_users = "${var.upload_users}"
}
We have one s3 bucket created manually, and I try to import it. Terraform import command does not find the configuration file and errors.
Error: resource address "aws_s3_bucket.machine-learning" does not exist in the configuration.
Before importing this resource, please create its configuration in the root module. For example:
resource "aws_s3_bucket" "machine-learning" {
# (resource arguments)
}
terraform apply/plan do find the configuration and wants to create it which is not what we want?
Thanks for you help!
================================
Edit:
now moved configuration to root and ended up with different error...