Closed xescugc closed 1 year ago
@xescugc
I am experimenting with terracognita and encountered the same issue you have also. From stack overflow, it appears theres some incompatibility with terracognita and v4+ of the AWS provider.
I was able to import my s3 buckets by downgrading the version of the aws provider, modifying my hcl.tf
file like so
provider "aws" {
}
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 3.74.1"
}
}
required_version = ">= 1.0"
}
That is actually really useful! I see the issue, on TC we are importing with the version we use internally, at this time AWS is 4.9.0, but we declare it without a version on the terraform
block, so it pulls the latest version which may have in consistencies with the imported one, as is the case.
Actually righ now if we where to set the version of the imported one like:
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "=4.9.0"
}
}
required_version = ">= 1.0"
}
This works, so I'll make it so we add the specific version to the provider :).
General information:
Describe the bug:
When importing
aws_s3_bucket
we get this errors:or
Log message
Here you can paste the log message or paste the link to console logs. If the log message is too big, you can use a tool like https://pastebin.com/.
Additional context
Add any other context about the problem here.