My Requirement is to integrate our AWS account with NewRelic with Terraform, i am able to link AWS account with NewRelic using Console Access, as a pre-requisite i need to Create IAM role with Inclusion of Trusted Entity with New-Relic Account, following steps listed below
Go to infrastructure.newrelic.com > AWS. Click on one of the available service tiles to get started.
From the IAM console , click Create role, then click Another AWS account.
For Account ID, use 7XXXXXXXXXX. Check the Require external ID box. For External ID, enter your New Relic account ID.
Do not enable the setting to Require MFA (multi-factor authentication). Attach the Policy: Search for ReadOnlyAccess, select the checkbox for the policy named ReadOnlyAccess, then click Next: Review. Alternatively, you can create your own managed policy and limit the permissions you grant New Relic according to the AWS services you want to monitor. For the Role name, enter NewRelicInfrastructure-Integrations, then click Create role.
My requirement is to do same with Terraform Script, i explored https://www.terraform.io/docs/providers/aws/r/iam_role.html, but unable to find some relevant options which can work same as above listed steps ( Like Inclusion of Another AWS account ).