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
+25-10Lines changed: 25 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -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) to create the S3 bucket and DynamoDB table.
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"# Replace with GitHub handle
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
+91-15Lines changed: 91 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,6 +32,9 @@ 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
+
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.
36
+
37
+
If you've already completed these steps or you aren't making Terraform changes, 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)
35
38
36
39
### **Creating a personal AWS account**
37
40
@@ -132,41 +135,83 @@ Below are guidelines for contributing to the devops-security repository hosted o
132
135
```
133
136
<sub>[Back to Table of Contents](#table-of-contents)</sub>
134
137
***
138
+
The below steps must be completed in order to authenticate to AWS locally via the command line interface (CLI):
- Set partition key to `LockID` with a type of `string`
180
+
- Choose on-demand capacity
149
181
150
-
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.
182
+
You can create the table from the AWS UI, CloudShell, or from the CLI using the following command:
151
183
152
-
**Note:** Users will need to create their backend state exactly as specified (i.e. using the same naming conventions).
Remeber to match these values to the ones in your backend state (and replace {developer-specific} with your actual name)
207
+
Remember to match these values to the ones in your backend state (and replace USERNAME with your username)
208
+
209
+
<sub>[Back to Table of Contents](#table-of-contents)</sub>
210
+
***
211
+
212
+
### **Installing Terraform**
213
+
214
+
Use the [Official HashiCorp install instructions](https://developer.hashicorp.com/terraform/install) for installing terraform.
170
215
171
216
<sub>[Back to Table of Contents](#table-of-contents)</sub>
172
217
***
@@ -232,35 +277,66 @@ When you've finished working on your issue, follow the steps below to prepare yo
232
277
***
233
278
234
279
### **Terraform Setup and Execution Instructions**
280
+
Make the required changes and execute them to see the changes in your own AWS account
235
281
236
282
- Change into `terraform` directory with
237
283
238
284
```bash
239
285
cd terraform
240
286
```
241
287
242
-
- Next initilize the terraform configuration
288
+
- Initialize the terraform configuration
243
289
244
290
```bash
245
291
terraform init --backend-config=backend.tfvars
246
292
```
247
293
248
-
- Then generate and run an execution plan
294
+
- Generate and run an execution plan
249
295
250
296
```bash
251
297
terraform plan
252
298
```
299
+
300
+
- Apply your changes
301
+
```bash
302
+
terraform apply
303
+
```
304
+
305
+
- Optional: delete the resources created
306
+
```bash
307
+
terraform destroy
308
+
```
309
+
310
+
<sub>[Back to Table of Contents](#table-of-contents)</sub>
311
+
***
312
+
313
+
### Generate Terraform Docs
314
+
Terraform docs allow the easy updating of README files inside of Terraform directories
315
+
316
+
Navigate to the directory where the changes were made
317
+
```bash
318
+
cd terraform # or other directory
319
+
```
320
+
```bash
321
+
terraform-docs -c .terraform.docs.yml .
322
+
```
323
+
253
324
<sub>[Back to Table of Contents](#table-of-contents)</sub>
254
325
***
255
326
256
327
### **Submitting changes via git and opening a PR**
257
328
258
329
- 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
330
331
+
Example:
332
+
```bash
333
+
git add terraform/aws-users.tf
334
+
```
335
+
260
336
- Then commit the changes with a descriptive message using
261
337
262
338
```bash
263
-
git commit -m "your commit message"
339
+
git commit -m "Updating documentation" # Change the message to summarize the changes you've made
264
340
```
265
341
266
342
- Push changes to the remote repository, replace the `branch_name` with the name of the branch you are working on
0 commit comments