Skip to content

Commit f66aae3

Browse files
authored
Update index.html.markdown
1 parent 754ba90 commit f66aae3

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

website/docs/index.html.markdown

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ export AWS_SECRET_ACCESS_KEY="secret”
117117

118118
Note: AWS STS secrets are short lived by default, use the ` --duration-seconds` flag to specify longer duration as needed
119119

120-
5. Store each of the 3 new created secrets from AWS STS as environment variables. For example:
120+
5. Store each of the 3 new created secrets from AWS STS as environment variables (hardcoding secrets into config file with additional risk is also supported). For example:
121121
```
122122
export AWS_ACCESS_KEY_ID="ASIAYBYSK3S5FZEKLETV"
123123
export AWS_SECRET_ACCESS_KEY="lgT6kL9lr1fxM6mCEwJ33MeoJ1M6lIzgsiW23FGH"
@@ -132,6 +132,7 @@ provider "mongodbatlas" {
132132
role_arn = "arn:aws:iam::476xxx451:role/mdbsts"
133133
}
134134
secret_name = "mongodbsecret"
135+
// fully qualified secret_name ARN also supported as input "arn:aws:secretsmanager:af-south-1:553552370874:secret:test789-TO06Hy"
135136
region = "us-east-2"
136137
137138
aws_access_key_id = "ASIXXBNEK"
@@ -140,7 +141,13 @@ provider "mongodbatlas" {
140141
sts_endpoint = "https://sts.us-east-2.amazonaws.com/"
141142
}
142143
```
143-
Note: `aws_access_key_id`, `aws_secret_access_key`, and `aws_session_token` can also be passed in using environment variables i.e. aws_access_key_id will accept AWS_ACCESS_KEY_ID and TF_VAR_AWS_ACCESS_KEY_ID as a default value in place of value in a terraform file variable. Also `sts_endpoint` will be generated on behalf of user if not provider.
144+
Note: `aws_access_key_id`, `aws_secret_access_key`, and `aws_session_token` can also be passed in using environment variables i.e. aws_access_key_id will accept AWS_ACCESS_KEY_ID and TF_VAR_AWS_ACCESS_KEY_ID as a default value in place of value in a terraform file variable.
145+
146+
Note: Fully qualified `secret_name` ARN as input is REQUIRED for cross-AWS account secrets. For more detatils see:
147+
* https://aws.amazon.com/blogs/security/how-to-access-secrets-across-aws-accounts-by-attaching-resource-based-policies/
148+
* https://aws.amazon.com/premiumsupport/knowledge-center/secrets-manager-share-between-accounts/
149+
150+
Note: `sts_endpoint` parameter is REQUIRED for cross-AWS region secrets.
144151

145152
7. In terminal, `terraform init`
146153

0 commit comments

Comments
 (0)