Prerequisites
- Terraform 1.6 or later, with credentials for your AWS payer (management) account. Child and member accounts are not supported.
- Permission to create IAM policies and roles, S3 buckets, and Cost and Usage Report exports in that account.
- Cost Explorer turned on in the payer account. See Turn on Cost Explorer in your payer account.
- Optional: an existing S3 bucket in
us-east-1for the CUR. AWS only offers CUR exports inus-east-1. An existing bucket is never changed, so its bucket policy must already allowbillingreports.amazonaws.comandbcm-data-exports.amazonaws.comto write to it.
Terraform module
Choose the setup method
Enter your account
Name the CUR bucket and exports
Apply the configuration
Paste the role ARN
terraform output -raw role_arn, paste the value into Role ARN in the wizard, then run verification.Terraform, full setup
In this option, Terraform registers the account with nOps itself. It uses an onboarding key you create in the wizard. The key can only register new AWS accounts. It cannot read, change, or delete anything in nOps.Choose the setup method
Enter your account
Name the CUR bucket and exports
Create the onboarding key
Download the files
Apply
CLARA_API_KEY exported, run:What the result means
After onboarding
- Revoke the key when you are done. You can revoke it in the wizard, and it is no longer needed once the account is registered.
- Re-running the same configuration is safe. Terraform already has the resources in its state, so
terraform applychanges nothing. - Registration is create-only. To change the integration later, or to disconnect it, use Settings in nOps.
terraform destroyremoves the AWS resources but leaves the integration in nOps.
Troubleshooting
The apply fails with EntityAlreadyExists
The apply fails with EntityAlreadyExists
Verification reports Cost Explorer actions as failing
Verification reports Cost Explorer actions as failing
The plan fails when I use an existing bucket
The plan fails when I use an existing bucket
us-east-1. Use a bucket in that region, or let the module create one.