-
-
Notifications
You must be signed in to change notification settings - Fork 999
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
unable to import pre-existing s3 bucket #1371
Comments
Could you share see your |
you mean the tfvars files in the live project repo of the structure? |
Log output:
Stack terrform.tfvars
environment.tfvars:
project terraform.tfvars:
|
any suggestions for this? |
Sorry for the delay.
What is in |
Just the name of the project im playing with
…On Thu, Nov 12, 2020, 12:47 AM Yevgeniy Brikman ***@***.***> wrote:
Sorry for the delay.
source = ***@***.***/IT/terraform-infra_modules.git//matillion"
What is in matillion?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1371 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABDWLH75VR3JGNTJ4OGXK3TSPOOITANCNFSM4RY52CTQ>
.
|
Right, but what is in that project? Because the code you showed is going to |
Its everything from an ALB to instances, IAM policies, and a bunch of stuff that's been successfully deployed. And I just added this s3 bucket manually, then added the code for it in this module but can't import it. Sorry if that's not helpful. Im not sure how to answer that |
Hm, the log output shows:
Why is it running in the folder |
Oh I get ya. The command I run has is just terragrunt import and then the details of the s3 bucket. Im guessing im doing something incorrect. Im just trying to treat terragrunt as a wrapper and subbing terraform for terragrunt to get a resource imported |
Could you copy/paste the exact command you're running? E.g., I see in the logs that there is a |
Ok so i got it sorted out. but the issue was in my provider resource
if i change tis to a hardcoded value it works for the import. then i can change it back and everything that wa simported still works fine. is this normal? that you have to hardcode that value? It works fine when running terragrunt plan && apply |
Ah, you may be hitting a Terraform |
Just to be familiar in case you're not, there's this project which can help you to import pre existing stuff to terraform with state file https://github.com/GoogleCloudPlatform/terraformer. |
Ya, i used something like that. (or that exact one) years ago but it only exported the resources into terraform code and didnt import to the state file. looks like it has come a long way. thanks for the tip!! |
So first, i know im behind on the versions, i have to do this to be able to update everything all at once.
running
terragrunt 0.18.7
terrafrom 0.11.14
and trying to import a pre-existing s3 bucket with
terragrunt import aws_s3_bucket.module_bucket_name bucket_to_import
and im getting
any advice? im hoping im missing something small
my file structure is
The text was updated successfully, but these errors were encountered: