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
256 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
• 56,160 points
1,426 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
269 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,160 points
46 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
538 views