Skip to content

Commit 9d19fcd

Browse files
authored
Update docs for assume role config (#406)
1 parent ef3d353 commit 9d19fcd

File tree

2 files changed

+28
-2
lines changed

2 files changed

+28
-2
lines changed

docs/configuration.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ plugin "aws" {
1414
region = "us-east-1"
1515
profile = "AWS_PROFILE"
1616
shared_credentials_file = "~/.aws/credentials"
17+
18+
assume_role {
19+
role_arn = "arn:aws:iam::123456789012:role/ROLE_NAME"
20+
external_id = "EXTERNAL_ID"
21+
policy = "..."
22+
session_name = "SESSION_NAME"
23+
}
1724
}
1825
```
1926

@@ -52,3 +59,9 @@ AWS shared credentials profile name used in the deep checking.
5259
Default: Profile declared in the `provider` block or `~/.aws/credentials` when the deep checking is enabled.
5360

5461
AWS shared credentials file path used in the deep checking.
62+
63+
## `assume_role`
64+
65+
Default: Assume role config declared in the `provider` block.
66+
67+
AWS assume role config used in the deep checking.

docs/deep_checking.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ Credentials can be set in several ways. Each is referenced in the following orde
3737
- ECS and CodeBuild task roles
3838
- EC2 role
3939

40-
4140
### Static credentials
4241

4342
If you have an access key and a secret key, you can pass these keys like the following:
@@ -53,7 +52,7 @@ plugin "aws" {
5352
}
5453
```
5554

56-
Although there is not recommended, if an access key is hard-coded in a provider configuration, they will also be taken into account. However, aliases are not supported. The priority is higher than the environment variable and lower than the above way.
55+
Although there is not recommended, if an access key is hard-coded in a provider configuration, they will also be taken into account. The priority is higher than the environment variable and lower than the above way.
5756

5857
```hcl
5958
provider "aws" {
@@ -105,6 +104,20 @@ This plugin fetches credentials in the same way as Terraform. See [this document
105104

106105
This plugin can assume a role in the same way as Terraform. See [this documentation](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#assume-role).
107106

107+
You can also declare the assume role config in the plugin config:
108+
109+
```hcl
110+
plugin "aws" {
111+
enabled = true
112+
113+
deep_check = true
114+
115+
assume_role {
116+
role_arn = "arn:aws:iam::123456789012:role/ROLE_NAME"
117+
}
118+
}
119+
```
120+
108121
## Required permissions
109122

110123
The following policy document provides the minimal set permissions necessary for the deep checking:

0 commit comments

Comments
 (0)