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,140 points
191 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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
• 56,120 points
1,089 views
+1 vote
5 answers

Can Celery be used with Amazon SQS

I regenerated the credentials in the IAM ...READ MORE

answered Oct 25, 2018 in AWS by triedntested
184 views
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
• 56,120 points
38 views
+3 votes
3 answers

Terraform AWS Cognito App Client

This feature is not currently supported by ...READ MORE

answered Aug 28, 2018 in AWS by eatcodesleeprepeat
• 4,670 points
440 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.