AWS Quicksight has a built in default role aws-quicksight-service-role-v0
which does not have any policy attached to it. Knowing its ARN, I want to attach policies to the role via terraform. How can I achieve this?
In other words, how can I import a manually/automatically created resource outside terraform, into terraform?
CodePudding user response:
To work with resources already existing use data-sources: https://www.terraform.io/language/data-sources
CodePudding user response:
If you just want to add a new policy to an existing IAM role and you know its ARN, you don't have to import it. You can just use aws_iam_role_policy to define and add the policy that you want to pre-existing role.