Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aws_s3_bucket: Value for unconfigurable attribute arn and hosted_zone_id #378

Closed
xescugc opened this issue Apr 19, 2023 · 2 comments · Fixed by #391
Closed

aws_s3_bucket: Value for unconfigurable attribute arn and hosted_zone_id #378

xescugc opened this issue Apr 19, 2023 · 2 comments · Fixed by #391
Assignees
Labels
Type: Bug Something isn't working

Comments

@xescugc
Copy link
Member

xescugc commented Apr 19, 2023

General information:

  • Operating System:
  • Terracognita version / tag:
  • Did you build Terracognita from sources or did you use the Docker image:

Describe the bug:

When importing aws_s3_bucket we get this errors:

Can't configure a value for "hosted_zone_id": its value will be decided automatically based on the result of applying this configuration.

or

Can't configure a value for "arn": its value will be decided automatically based on the result of applying this configuration.

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.

@xescugc xescugc added the Type: Bug Something isn't working label Apr 19, 2023
@mrslwiseman
Copy link

@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"
}

@xescugc
Copy link
Member Author

xescugc commented Jun 1, 2023

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 :).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants