Skip to content

Commit 6cdac7e

Browse files
authored
Add example of x-org scan with account_org_paths (#153)
1 parent 3c05ab1 commit 6cdac7e

File tree

1 file changed

+20
-0
lines changed
  • examples/cross_account/scanner_account

1 file changed

+20
-0
lines changed

examples/cross_account/scanner_account/main.tf

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,26 @@ provider "aws" {
1616
module "scanner_role" {
1717
source = "git::https://github.com/DataDog/terraform-module-datadog-agentless-scanner//modules/agentless-scanner-role?ref=0.11.4"
1818

19+
## By default the scanner can assume any role with the default naming
20+
## convention from any account.
21+
#
22+
# account_roles = ["arn:*:iam::*:role/DatadogAgentlessScannerDelegateRole"]
23+
24+
## It is also possible to explicitly list the roles the scanner can assume if
25+
## you changed the name of the delegate role:
26+
#
27+
# account_roles = ["arn:*:iam::111111111111:role/MyDatadogAgentlessScannerDelegateRole"]
28+
29+
## The account_org_paths variable can restrict the scanner to only be
30+
## allowed to assume roles from specific AWS Organizations organizational
31+
## unit (OU) paths.
32+
## reference: https://aws.amazon.com/blogs/security/how-to-control-access-to-aws-resources-based-on-aws-account-ou-or-organization/
33+
#
34+
# account_org_paths = [
35+
# "o-acorg/r-acroot/ou-acroot-mediaou/",
36+
# "o-acorg/r-acroot/ou-acroot-sportsou/*",
37+
# ]
38+
1939
api_key_secret_arns = [module.agentless_scanner.api_key_secret_arn]
2040
}
2141

0 commit comments

Comments
 (0)