generated from hackforla/.github-hackforla-base-repo-template
-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from hackforla/cb/example
adding mvp terraform config for aws iam resources
- Loading branch information
Showing
39 changed files
with
1,006 additions
and
395 deletions.
There are no files selected for viewing
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,18 @@ | ||
# Local .terraform directories | ||
**/.terraform/* | ||
|
||
# Ignore variables files | ||
*.auto.tfvars | ||
|
||
# Ignore override files | ||
*.tfoverride | ||
|
||
# Ignore environment-specific files | ||
.envrc | ||
|
||
# Ignore CLI configuration files | ||
.terraformrc | ||
terraform.rc | ||
|
||
# Ignore metadata files | ||
*.tfstate.lock.info |
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,20 @@ | ||
## Local Development/Installation instructions | ||
|
||
Step-by-step instructions help new contributors get a development environment up and running quickly. | ||
2. You'll want to find the balance between being specific enough for novices to follow, without being so specific that you reinvent the wheel by providing overly-basic instructions that can be found elsewhere. | ||
3. Feel free to adapt this section and its sub-sections to your own processes. | ||
4. Alternatively, you can move everything from *Installation instructions* through *Testing* to a separate **Contributing.md** file to keep your **ReadMe.md** more succinct. | ||
|
||
|
||
### Working with issues | ||
|
||
- Explain how to contribute to an existing issue. | ||
|
||
### Working with forks and branches | ||
|
||
- Explain your guidelines here. | ||
|
||
|
||
### Working with pull requests and reviews | ||
|
||
- Explain your process. |
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 |
---|---|---|
@@ -1,73 +1,26 @@ | ||
# Project title and description | ||
# DevOps Security | AWS IAM Resources | ||
|
||
Include a project description that explains **what** your project is and **why** it exists. Aim for no more than 3-5 concise sentences. For example, you might say: | ||
|
||
{Project Name} is a project of Hack for LA. Hack for LA is a brigade of a Code for America that exists to {your mission}. {Project Name} helps {target users} accomplish {goal of project}. The {app/site/thing you're building}'s main features include {very brief feature descriptions}. | ||
|
||
### Project context | ||
|
||
Civic projects often exist within a larger context that may include multiple stakeholders, historic relationships, associated research, or other details that are relevant but not *required* for direct contributions. Gathering these details in one place is useful, but the ReadMe isn't that place. Use this section to [link to a Google Doc](#) or other documentation repository where contributors can dig in if they so choose. This is also a good place to link to your Code of Conduct. | ||
DevOps Security is a code repository used to maintain Hack for L.A.'s AWS Identity Access Management (IAM) resources as code. This includes users, groups, policies, and roles. | ||
|
||
### Technology used | ||
|
||
- Each platform or framework should get its own bullet. | ||
- Each platform should include an [active link](#) to the official documentation. | ||
|
||
|
||
- [Terraform](https://www.terraform.io/) | ||
- [Terraform Docs](https://terraform-docs.io/) | ||
- [AWS CLI](https://aws.amazon.com/cli/) | ||
|
||
# How to contribute | ||
|
||
Explain the different ways people can contribute. For example: | ||
|
||
- Join the team {on Slack/at our weekly hack night/etc}. | ||
- To help with user research, {do ABC}. | ||
- To provide design support, {do XYZ}. | ||
- To contribute to the code, follow the instructions below. | ||
|
||
Remember to provide direct links to each channel. | ||
|
||
|
||
|
||
## Installation instructions | ||
|
||
1. Step-by-step instructions help new contributors get a development environment up and running quickly. | ||
2. You'll want to find the balance between being specific enough for novices to follow, without being so specific that you reinvent the wheel by providing overly-basic instructions that can be found elsewhere. | ||
3. Feel free to adapt this section and its sub-sections to your own processes. | ||
4. Alternatively, you can move everything from *Installation instructions* through *Testing* to a separate **Contributing.md** file to keep your **ReadMe.md** more succinct. | ||
|
||
|
||
### Working with issues | ||
|
||
- Explain how to submit a bug. | ||
- Explain how to submit a feature request. | ||
- Explain how to contribute to an existing issue. | ||
|
||
To create a new issue, please use the blank issue template (available when you click New Issue). If you want to create an issue for other projects to use, please create the issue in your own repository and send a slack message to one of your hack night hosts with the link. | ||
|
||
|
||
### Working with forks and branches | ||
|
||
- Explain your guidelines here. | ||
|
||
|
||
### Working with pull requests and reviews | ||
|
||
- Explain your process. | ||
|
||
|
||
### Testing | ||
|
||
- Provide instructions. | ||
|
||
- Join the DevOps Community of Practice (CoP). | ||
- To contribute to the codebase, follow the [CONTRIBUTING.md](CONTRIBUTING.md) guide. | ||
|
||
|
||
# Contact info | ||
|
||
Include at least one way (or more, if possible) to reach your team with questions or comments. | ||
This repo is maintained by the DevOps team. Reach out to our [CoP leads](https://github.com/hackforla/ops/wiki/Community#ops-community-of-practice-cop-leads) on Slack with questions or attend a [community meeting](https://github.com/hackforla/ops/wiki/CoP-Meetings) | ||
|
||
|
||
### Licensing | ||
|
||
Include details about the project's open source status. | ||
[MIT License](/LICENSE) | ||
|
||
*this readme file sourced from [Jessica Sand](http://jessicasand.com/other-stuff/just-enough-docs/)* |
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,71 @@ | ||
formatter: "markdown table" # this is required | ||
version: "" | ||
|
||
header-from: main.tf | ||
footer-from: "" | ||
|
||
recursive: | ||
enabled: false | ||
path: modules | ||
|
||
sections: | ||
hide: [] | ||
show: [] | ||
|
||
content: |- | ||
# Overview | ||
Resources created by this code repository. | ||
{{ .Header }} | ||
{{ .Modules }} | ||
{{ .Resources }} | ||
{{ .Inputs }} | ||
{{ .Outputs }} | ||
{{ .Providers }} | ||
{{ .Requirements }} | ||
{{ .Footer }} | ||
# Directory Structure | ||
Terraform directory structure | ||
- 📁 [terraform](https://github.com/hackforla/ops-security/tree/cb/example/terraform) | ||
- 📁 [aws-custom-policies](https://github.com/hackforla/ops-security/tree/cb/example/terraform/aws-custom-policies) - JSON configurations for customer-managed policies (AWS-managed policies are referenced by ARN and not needed here) | ||
- 📁 [existing-policies](https://github.com/hackforla/ops-security/tree/cb/example/terraform/aws-custom-policies/existing-policies) - a few of our current policy configurations for reference | ||
- 📁 [modules](https://github.com/hackforla/ops-security/tree/cb/example/terraform/modules) - reusable Terraform configurations | ||
- 📄 [aws-custom-policies.tf](https://github.com/hackforla/ops-security/tree/cb/example/terraform/modules/aws-groups) - maintain custom policies here | ||
- 📄 [aws-groups.tf](https://github.com/hackforla/ops-security/tree/cb/example/terraform/modules/aws-groups) - maintain groups here | ||
- 📄 [aws-users.tf](https://github.com/hackforla/ops-security/tree/cb/example/terraform/modules/aws-users) - maintain users here | ||
To automatically update this documentation, install terraform-docs on your local machine run the following: | ||
`cd <directory of README location to update>` | ||
`terraform-docs -c .terraform.docs.yml .` | ||
output: | ||
file: README.md | ||
mode: replace | ||
template: |- | ||
<!-- BEGIN_TF_DOCS --> | ||
{{ .Content }} | ||
<!-- END_TF_DOCS --> | ||
output-values: | ||
enabled: false | ||
from: "" | ||
|
||
sort: | ||
enabled: true | ||
by: name | ||
|
||
settings: | ||
anchor: true | ||
color: true | ||
default: true | ||
description: false | ||
escape: true | ||
hide-empty: true | ||
html: true | ||
indent: 2 | ||
lockfile: true | ||
read-comments: true | ||
required: true | ||
sensitive: true | ||
type: true |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,33 @@ | ||
<!-- BEGIN_TF_DOCS --> | ||
# Overview | ||
Resources created by this code repository. | ||
|
||
|
||
## Modules | ||
|
||
| Name | Source | Version | | ||
|------|--------|---------| | ||
| <a name="module_iam_read_only_group"></a> [iam\_read\_only\_group](#module\_iam\_read\_only\_group) | ./modules/aws-groups | n/a | | ||
| <a name="module_iam_user_gwenstacy"></a> [iam\_user\_gwenstacy](#module\_iam\_user\_gwenstacy) | ./modules/aws-users | n/a | | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
# Directory Structure | ||
Terraform directory structure | ||
|
||
- 📁 [terraform](https://github.com/hackforla/ops-security/tree/cb/example/terraform) | ||
- 📁 [aws-custom-policies](https://github.com/hackforla/ops-security/tree/cb/example/terraform/aws-custom-policies) - JSON configurations for customer-managed policies (AWS-managed policies are referenced by ARN and not needed here) | ||
- 📁 [existing-policies](https://github.com/hackforla/ops-security/tree/cb/example/terraform/aws-custom-policies/existing-policies) - a few of our current policy configurations for reference | ||
- 📁 [modules](https://github.com/hackforla/ops-security/tree/cb/example/terraform/modules) - reusable Terraform configurations | ||
- 📄 [aws-custom-policies.tf](https://github.com/hackforla/ops-security/tree/cb/example/terraform/modules/aws-groups) - maintain custom policies here | ||
- 📄 [aws-groups.tf](https://github.com/hackforla/ops-security/tree/cb/example/terraform/modules/aws-groups) - maintain groups here | ||
- 📄 [aws-users.tf](https://github.com/hackforla/ops-security/tree/cb/example/terraform/modules/aws-users) - maintain users here | ||
|
||
To automatically update this documentation, install terraform-docs on your local machine run the following: | ||
`cd <directory of README location to update>` | ||
`terraform-docs -c .terraform.docs.yml .` | ||
<!-- END_TF_DOCS --> |
21 changes: 21 additions & 0 deletions
21
terraform/aws-custom-policies/existing-policies/manage-access-keys-policy.json
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,21 @@ | ||
{ | ||
"Version": "2012-10-17", | ||
"Statement": [ | ||
{ | ||
"Sid": "ListUsersForConsole", | ||
"Effect": "Allow", | ||
"Action": "iam:ListUsers", | ||
"Resource": "arn:aws:iam::*:*" | ||
}, | ||
{ | ||
"Sid": "ViewAndUpdateAccessKeys", | ||
"Effect": "Allow", | ||
"Action": [ | ||
"iam:UpdateAccessKey", | ||
"iam:CreateAccessKey", | ||
"iam:ListAccessKeys" | ||
], | ||
"Resource": "arn:aws:iam::*:user/*" | ||
} | ||
] | ||
} |
46 changes: 46 additions & 0 deletions
46
terraform/aws-custom-policies/existing-policies/self-manage-credentials-policy.json
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,46 @@ | ||
{ | ||
"Version": "2012-10-17", | ||
"Statement": [ | ||
{ | ||
"Sid": "AllowViewAccountInfo", | ||
"Effect": "Allow", | ||
"Action": [ | ||
"iam:GetAccountPasswordPolicy", | ||
"iam:GetAccountSummary" | ||
], | ||
"Resource": "*" | ||
}, | ||
{ | ||
"Sid": "AllowManageOwnPasswords", | ||
"Effect": "Allow", | ||
"Action": [ | ||
"iam:ChangePassword", | ||
"iam:GetUser" | ||
], | ||
"Resource": "arn:aws:iam::*:user/${aws:username}" | ||
}, | ||
{ | ||
"Sid": "AllowManageOwnAccessKeys", | ||
"Effect": "Allow", | ||
"Action": [ | ||
"iam:CreateAccessKey", | ||
"iam:DeleteAccessKey", | ||
"iam:ListAccessKeys", | ||
"iam:UpdateAccessKey" | ||
], | ||
"Resource": "arn:aws:iam::*:user/${aws:username}" | ||
}, | ||
{ | ||
"Sid": "AllowManageOwnSSHPublicKeys", | ||
"Effect": "Allow", | ||
"Action": [ | ||
"iam:DeleteSSHPublicKey", | ||
"iam:GetSSHPublicKey", | ||
"iam:ListSSHPublicKeys", | ||
"iam:UpdateSSHPublicKey", | ||
"iam:UploadSSHPublicKey" | ||
], | ||
"Resource": "arn:aws:iam::*:user/${aws:username}" | ||
} | ||
] | ||
} |
27 changes: 27 additions & 0 deletions
27
terraform/aws-custom-policies/existing-policies/terraform-policy.json
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,27 @@ | ||
{ | ||
"Version": "2012-10-17", | ||
"Statement": [ | ||
{ | ||
"Sid": "VisualEditor0", | ||
"Effect": "Allow", | ||
"Action": [ | ||
"elasticloadbalancing:DescribeTargetGroupAttributes", | ||
"elasticloadbalancing:DescribeTags", | ||
"s3:ListAllMyBuckets", | ||
"ecr:GetRegistryScanningConfiguration" | ||
], | ||
"Resource": "*" | ||
}, | ||
{ | ||
"Sid": "RDS", | ||
"Effect": "Allow", | ||
"Action": [ | ||
"rds:DescribeDBInstances", | ||
"rds:DescribeDBClusters", | ||
"rds:DescribeGlobalClusters", | ||
"rds:DescribeDBInstances" | ||
], | ||
"Resource": "*" | ||
} | ||
] | ||
} |
Oops, something went wrong.