-
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Decide on Secrets Placement for Terraform (#702)
Co-authored-by: Erik Osterman (CEO @ Cloud Posse) <[email protected]>
- Loading branch information
Showing
2 changed files
with
63 additions
and
5 deletions.
There are no files selected for viewing
55 changes: 55 additions & 0 deletions
55
docs/layers/project/design-decisions/decide-on-secrets-management-placement.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
--- | ||
title: "Decide on Secrets Placement for Terraform" | ||
sidebar_label: "Secrets Placement" | ||
sidebar_position: 5 | ||
refarch_id: REFARCH-81 | ||
description: "Decide where to store secrets used by Terraform" | ||
--- | ||
import Intro from '@site/src/components/Intro'; | ||
|
||
<Intro> | ||
We need to decide where to store secrets used by Terraform. We have two options: store secrets in each account or store them in a centralized account. | ||
</Intro> | ||
|
||
## Context | ||
|
||
Often we need to integrate with third-party services or internal services that require API keys or other secrets. We need to decide where to store these secrets so that Terraform can access them. There are two reasonable options for storing secrets in our AWS account architecture. We need to decide which one to use. | ||
|
||
### Option 1: Store Secrets in each account | ||
|
||
The first option is to store the credential in the same account as the resource. For example, API keys scoped to `dev` would live in `plat-dev`. | ||
|
||
#### Pros | ||
|
||
- Accounts can easily access their given credentials | ||
- IAM level boundaries are enforced between accounts | ||
|
||
#### Cons | ||
|
||
- Secret administrators need to access many accounts to create those secrets | ||
- There is no centralized management for all secrets out there | ||
|
||
### Option 2: Store Credentials in a Centralized Account | ||
|
||
The second option is to store the credentials in a centralized account, such as `corp` or `auto`. Now you would need to share those credentials with each account, for example with [AWS RAM](https://aws.amazon.com/ram/). | ||
|
||
#### Pros | ||
|
||
- Centralized secrets management | ||
- Secret administrators have a single place to manage secrets | ||
- Once shared, resources in a given account still access their given secrets from their own account. They do not need to reach out to another account | ||
|
||
#### Cons | ||
|
||
- Complexity with AWS RAM | ||
- Secret administrators must be careful to share secrets with the correct accounts | ||
- You need to decide what account to use as the centralized management account. We could deploy `corp` if you'd like for this or reuse `auto`. | ||
|
||
## Decision | ||
|
||
We will use AWS SSM Parameter Store for all platform-level secrets used by `infrastructure` and `terraform`. | ||
|
||
## Related | ||
|
||
- [Decide on Secrets Strategy for Terraform](/layers/project/design-decisions/decide-on-secrets-management-strategy-for-terraform/) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters