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
-[**What if you accidentally cloned using the repository URL from the HackForLA Github (instead of the fork on your Github)?**](#what-if-you-accidentally-cloned-using-the-repository-url-from-the-hackforla-github-instead-of-the-fork-on-your-github)
-[**ii. Add an `upstream` remote**](#ii-add-an-upstream-remote)
34
+
-[**Create a new branch where you will work on your issue**](#create-a-new-branch-where-you-will-work-on-your-issue)
35
+
-[**Terraform Setup and Execution Instructions**](#terraform-setup-and-execution-instructions)
36
+
-[**Submitting changes via git and opening a PR**](#submitting-changes-via-git-and-opening-a-pr)
33
37
34
38
## **Setting up the local development environment**
35
39
@@ -121,10 +125,12 @@ Below are guidelines for contributing to the devops-security repository hosted o
121
125
-### **Generating Access Keys for AWS CLI**
122
126
- Open CloudShell
123
127
- Generate the Access Keys for AWS CLI
128
+
124
129
```bash
125
130
aws iam create-access-key --user-name UserName > access_key.json
126
131
```
127
132
- Print the contents of `access_key.json` and copy the contents to a secure location (you'll need the keys when you set up AWS CLI below)
133
+
128
134
```bash
129
135
nano access_key.json
130
136
```
@@ -143,6 +149,15 @@ Use the [Official HashiCorp install instructions](https://developer.hashicorp.co
143
149
<sub>[Back to Table of Contents](#table-of-contents)</sub>
144
150
***
145
151
152
+
### **Creating Backend State**
153
+
154
+
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.
155
+
156
+
**Note:** Users will need to create their backend state exactly as specified (i.e. using the same naming conventions).
157
+
158
+
<sub>[Back to Table of Contents](#table-of-contents)</sub>
159
+
***
160
+
146
161
### **Installing Terraform docs**
147
162
148
163
Follow the Terraform docs [installation guide](https://terraform-docs.io/user-guide/installation/)
<sub>[Back to Table of Contents](#table-of-contents)</sub>
248
263
***
264
+
265
+
### **Create a new branch where you will work on your issue**
266
+
267
+
Using the `-b` flag you can also use the `git checkout`command to create a new branch and immediately switch into it.
268
+
269
+
For example, if you create a new issue branch for [Update Contributing document to include next steps - #15](https://github.com/hackforla/devops-security/issues/15):
270
+
271
+
```bash
272
+
git checkout -b update-contributing-guide-15
273
+
```
274
+
275
+
The text after the `-b`, in the example `update-contributing-guide-15`, will be the name of your new branch.
276
+
277
+
**Note:** Choose a branch name that:
278
+
* relates to the issue (No spaces!)
279
+
* includes the issue number
280
+
281
+
**Note:** The format should look like the scheme above where the words are a brief description of the issue that will make sense at a glance to someone unfamiliar with the issue.
282
+
283
+
**Note:** No law of physics will breakif you don't adhere to this scheme, but laws of git will break if you add spaces.
284
+
285
+
When you've finished working on your issue, follow the steps below to prepare your changes to push to your repository.
286
+
287
+
<sub>[Back to Table of Contents](#table-of-contents)</sub>
288
+
***
289
+
290
+
### **Terraform Setup and Execution Instructions**
291
+
292
+
- Change into `terraform` directory with
293
+
294
+
```bash
295
+
cd terraform
296
+
```
297
+
298
+
- Next initilize the terraform configuration
299
+
300
+
```bash
301
+
terraform init
302
+
```
303
+
304
+
- Then generate and run an execution plan
305
+
306
+
```bash
307
+
terraform plan
308
+
```
309
+
<sub>[Back to Table of Contents](#table-of-contents)</sub>
310
+
***
311
+
312
+
### **Submitting changes via git and opening a PR**
313
+
314
+
- 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.
315
+
316
+
- Then commit the changes with a descriptive message using
317
+
318
+
```bash
319
+
git commit -m "your commit message"
320
+
```
321
+
322
+
- Push changes to the remote repository, replace the `branch_name` with the name of the branch you are working on
323
+
324
+
```bash
325
+
git push --set-upstream origin main branch_name
326
+
```
327
+
- Lastly open a PR to merge your changes into the `main` branch.
328
+
329
+
<sub>[Back to Table of Contents](#table-of-contents)</sub>
0 commit comments