Issue with RDS import terraform

0 votes

I am new to terraform

I've created RDS manually in AWS.

Now I tried to import RDS into terraform using https://www.terraform.io/docs/providers/aws/r/db_instance.html so that I can use terraform to update RDS. The database name is mydb. I have ran terraform init but got this error, still not sure how to resolve it. Please advise. thx

terraform import aws_db_instance mydb
Error: invalid resource address "aws_db_instance"

For information on valid syntax, see:
https://www.terraform.io/docs/internals/resource-addressing.html
Nov 2, 2018 in AWS by findingbugs
• 3,260 points
2,194 views

1 answer to this question.

0 votes

I guess this was the mistake you were doing:

Try this it will work fine

resource "aws_db_instance" "xyz"{

     #... db configuration...
}

run terraform import aws_db_instance.xyz aws_arn_for_db

answered Nov 2, 2018 by Subhodeep Ghosh

Related Questions In AWS

0 votes
1 answer

Can we use Terraform to execute SQL script on RDS MySQL?

I don't think remote-exec is what you ...READ MORE

answered Aug 21, 2018 in AWS by Priyaj
• 58,020 points
11,168 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Can't find class CognitoUserPoolsSignInProvider: Issue with Sign In integration

CognitoUserPoolsSignInProvider is ditributed as part of aws-android-sdk-auth-userpools library. Please import ...READ MORE

answered Sep 28, 2018 in AWS by Priyaj
• 58,020 points
923 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP