You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/ISSUE_TEMPLATE/pre-work-template-devops-security.md
+26-11Lines changed: 26 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ assignees: ''
9
9
---
10
10
11
11
### Prerequisite
12
-
We are looking forward to having you on our team. Please ensure you have prior experience with the HfLA website team before contributing to our repository.
12
+
We are looking forward to having you on our team. Please ensure you have prior experience with the HfLA website team before contributing to our repository
13
13
### Overview
14
14
As a new member on the HfLA devops-security team, fill in the following fields as you complete each onboarding item.
15
15
@@ -22,9 +22,9 @@ As a new member on the HfLA devops-security team, fill in the following fields a
22
22
23
23
-[ ] Before starting to work on the below instructions, make sure to join the #ops Slack Channel. And are a member of `devops-security` repository.
24
24
-[ ] Self-assign this issue (gear in right side panel).
25
-
-[ ] Add this issue to the Project Board under the Projects section (gear in right side panel).
25
+
-[ ] Add this issue to the Project Board CoP: DevOps: Project Board - under the Projects section (gear in right side panel).
26
26
-[ ] Attend weekly team meeting, Wednesdays 6-8pm PST.
27
-
-[ ] Note: There are no meetings on the 1st-7th of every month.
27
+
-[ ] Note: There are no meetings on the 1st Wednesday of every month.
28
28
-[ ] Complete the steps in [Creating a personal AWS account](https://github.com/hackforla/devops-security/blob/main/CONTRIBUTING.md#creating-a-personal-aws-account) and [Login as root user & setup MFA](https://github.com/hackforla/devops-security/blob/main/CONTRIBUTING.md#login-as-root-user-&-setup-mfa).
29
29
-[ ] Read and follow the instructions in [Setting up IAM and AWS CLI](https://github.com/hackforla/devops-security/blob/main/CONTRIBUTING.md#setting-up-iam-and-aws-cli) for:
30
30
-[ ][Creating an IAM User](https://github.com/hackforla/devops-security/blob/main/CONTRIBUTING.md#create-an-iam-group)
@@ -35,7 +35,9 @@ As a new member on the HfLA devops-security team, fill in the following fields a
35
35
-[ ][Generating user access keys](https://github.com/hackforla/devops-security/blob/main/CONTRIBUTING.md#generating-access-keys-for-aws-cli)
36
36
-[ ] Complete the instructions in [AWS Documentation](https://docs.aws.amazon.com/cli/v1/userguide/cli-chap-install.html) and choose your operating system to install AWS CLI.
37
37
-[ ] Complete the instruction in [AWS Documentation](https://docs.aws.amazon.com/cli/latest/userguide/cli-authentication-short-term.html) to setup the AWS CLI.
38
-
-[ ] Read follow the instructions in [Creating a backend state](https://github.com/hackforla/devops-security/blob/main/CONTRIBUTING.md#creating-backend-state).
38
+
-[ ] Follow the instructions in [Creating a backend state](https://github.com/hackforla/devops-security/blob/main/CONTRIBUTING.md#creating-backend-state).
39
+
-[ ] Create the S3 bucket
40
+
-[ ] Create the DynamoDB table
39
41
-[ ] Install Terraform locally by following the instructions of the installation guide mentioned in [Installing Terraform](https://github.com/hackforla/devops-security/blob/main/CONTRIBUTING.md#installing-terraform)
40
42
-[ ] Install Terraform Docs locally by following the instructions of the installation guide mentioned in [Installing Terraform docs](https://github.com/hackforla/devops-security/blob/main/CONTRIBUTING.md#installing-terraform-docs)
41
43
-[ ] Complete the instructions in [Clone the repository](https://github.com/hackforla/devops-security/blob/main/CONTRIBUTING.md#clone-the-repository)
@@ -46,14 +48,14 @@ As a new member on the HfLA devops-security team, fill in the following fields a
46
48
git checkout -b issue-number-add-new-iam-user
47
49
48
50
```
49
-
- [ ] Navigate to the `aws-user.tf` file and add your user information and follow the below template.
51
+
- [ ] Navigate to the `aws-user.tf` file and add your user information to the end of the file following the below template.
50
52
51
53
```bash
52
-
53
-
module "iam_user_testiamuser" {
54
+
# Replace USERNAME with your GitHub handle
55
+
module "iam_user_USERNAME" {
54
56
source = "./modules/aws-users"
55
57
56
-
user_name = "testiamuser"
58
+
user_name = "USERNAME"
57
59
user_tags = {
58
60
"Project" = "devops-security"
59
61
"Access Level" = "1"
@@ -63,12 +65,25 @@ As a new member on the HfLA devops-security team, fill in the following fields a
63
65
64
66
```
65
67
- [ ] In your code editor navigate to `terraform` directory. `cd terraform`
68
+
69
+
Note: You must be authenticated to your AWS account via the CLI for the next commands to work. The above instructions for setting up the CLI will guide you through this process. To check to see if you are authenticated, run `aws sts get-caller-identity`. You should get a response like:
70
+
71
+
```
72
+
{
73
+
"UserId": "ABCDEFGHIJKLMNOPQRSTU",
74
+
"Account": "012345678910",
75
+
"Arn": "arn:aws:iam::012345678910:user/USERNAME"
76
+
}
77
+
```
78
+
If you are unable to authenticate from your local machine using the CLI, post in the #ops channel in Slack so that the team can help you get unblocked.
66
79
- [ ] Execute the command`terraform init` to initialize terraform in the directory. Address any failures that arise (if any).
67
80
- [ ] Execute the command`terraform plan` this will output a plan replicating the same IAM resources as the devops security account. Address any failures that arise (if any).
68
-
- [ ] Then execute the command`terraform apply` this will create all of the resources that are currently managed by Devops Security. All of the resources created here incur zero cost except forthe Dynamo DB installation, which should remainin the free tier.
69
-
- [ ] ** If you have cost concerns, Run a Terraform Destroy to take down all of the resources you created (don't worry, you can recreate them just as quickly). **
81
+
- [ ] Then execute the command`terraform apply` this will create all of the resources that are currently managed by Devops Security. All of the resources created here incur zero cost except forthe Dynamo DB installation, which should remainin the free tier. **
82
+
- [ ] **If you have cost concerns, Run a Terraform Destroy to take down all of the resources you created (don't worry, you can recreate them just as quickly). If you create resources outside of what's described in this issue, you may incur charges.**
83
+
- [ ] Update the README using Terraform Docs to document changes
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+85-15Lines changed: 85 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,7 +32,7 @@ Below are guidelines for contributing to the devops-security repository hosted o
32
32
-[**Submitting changes via git and opening a PR**](#submitting-changes-via-git-and-opening-a-pr)
33
33
34
34
## **Setting up the local development environment**
35
-
35
+
The below instructions will walk you through setting up your own AWS account for local development and testing before pushing changes that will effect our infrastructure. If you've already completed these steps, skip to [Create a branch](https://github.com/hackforla/devops-security/blob/main/CONTRIBUTING.md#create-a-new-branch-where-you-will-work-on-your-issue)
36
36
### **Creating a personal AWS account**
37
37
38
38
- Go to [AWS](https://aws.amazon.com/) and click `"Sign In to the Console" > "Create a new AWS account."`
@@ -132,24 +132,59 @@ Below are guidelines for contributing to the devops-security repository hosted o
132
132
```
133
133
<sub>[Back to Table of Contents](#table-of-contents)</sub>
134
134
***
135
+
The below steps must be completed in order to authenticate to AWS locally via the command line interface (CLI):
To facilitate AWS IAM changes using Terraform, it's essential to establish backend state storage. Refer to and follow the instructions outlined in this [issue](https://github.com/hackforla/ops/issues/105) to create the backend state.
Remeber to match these values to the ones in your backend state (and replace {developer-specific} with your actual name)
204
+
Remember to match these values to the ones in your backend state (and replace USERNAME with your username)
205
+
206
+
<sub>[Back to Table of Contents](#table-of-contents)</sub>
207
+
***
208
+
209
+
### **Installing Terraform**
210
+
211
+
Use the [Official HashiCorp install instructions](https://developer.hashicorp.com/terraform/install) for installing terraform.
170
212
171
213
<sub>[Back to Table of Contents](#table-of-contents)</sub>
172
214
***
@@ -232,35 +274,63 @@ When you've finished working on your issue, follow the steps below to prepare yo
232
274
***
233
275
234
276
### **Terraform Setup and Execution Instructions**
277
+
Make the required changes and execute them to see the changes in your own AWS account
235
278
236
279
- Change into `terraform` directory with
237
280
238
281
```bash
239
282
cd terraform
240
283
```
241
284
242
-
- Next initilize the terraform configuration
285
+
- Initialize the terraform configuration
243
286
244
287
```bash
245
288
terraform init --backend-config=backend.tfvars
246
289
```
247
290
248
-
- Then generate and run an execution plan
291
+
- Generate and run an execution plan
249
292
250
293
```bash
251
294
terraform plan
252
295
```
296
+
297
+
- Apply your changes
298
+
```bash
299
+
terraform apply
300
+
```
301
+
302
+
- Optional: delete the resources created
303
+
```bash
304
+
terraform destroy
305
+
```
306
+
253
307
<sub>[Back to Table of Contents](#table-of-contents)</sub>
254
308
***
255
309
310
+
### Generate Terraform Docs
311
+
Terraform docs allow the easy updating of README files inside of Terraform directories
312
+
313
+
Navigate to the directory where the changes were made
314
+
```bash
315
+
cd terraform # or other directory
316
+
```
317
+
```bash
318
+
terraform-docs -c .terraform.docs.yml .
319
+
```
320
+
256
321
### **Submitting changes via git and opening a PR**
257
322
258
323
- We urge developers to be cautious using `git add`. In general it is not advisable to use `git add -all` or `git add .`. Rather, run `git status`, examine the output carefully, and then add only those files specifically related to the current issue. This will ensure that no extraneous files are included in the subsequent commit.
259
324
325
+
Example:
326
+
```bash
327
+
git add terraform/aws-users.tf
328
+
```
329
+
260
330
- Then commit the changes with a descriptive message using
261
331
262
332
```bash
263
-
git commit -m "your commit message"
333
+
git commit -m "Updating documentation" # Change the message to summarize the changes you've made
264
334
```
265
335
266
336
- Push changes to the remote repository, replace the `branch_name` with the name of the branch you are working on
0 commit comments