diff --git a/.github/ISSUE_TEMPLATE/pre-work-template-devops-security.md b/.github/ISSUE_TEMPLATE/pre-work-template-devops-security.md index 2b5d53e..450dc4c 100644 --- a/.github/ISSUE_TEMPLATE/pre-work-template-devops-security.md +++ b/.github/ISSUE_TEMPLATE/pre-work-template-devops-security.md @@ -37,12 +37,8 @@ As a new member on the HfLA devops-security team, fill in the following fields a - [ ] Complete the instruction in [AWS Documentation](https://docs.aws.amazon.com/cli/latest/userguide/cli-authentication-short-term.html) to setup the AWS CLI. - [ ] Read follow the instructions in [Creating a backend state](https://github.com/hackforla/devops-security/blob/main/CONTRIBUTING.md#creating-backend-state). - [ ] 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) -- [ ] Install Terraform Docs locally by following the instructions of the installation guide mentiond in [Installing Terrafrom docs](https://github.com/hackforla/devops-security/blob/main/CONTRIBUTING.md#installing-terraform-docs) -- [ ] Complete the instructions in [Fork the repository](https://github.com/hackforla/devops-security/blob/main/CONTRIBUTING.md#fork-the-repository) and [Clone (Create) a copy on your computer](https://github.com/hackforla/devops-security/blob/main/CONTRIBUTING.md#clone-create-a-copy-on-your-computer) -- [ ] In your code editor navigate to `terraform` directory. -- [ ] Execute the command `terraform plan` this will output a plan replicating the same IAM resources as the devops security account. -- [ ] 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 for the Dynamo DB installation, which should remain in the free tier. - - [ ] ** 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). ** +- [ ] 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) +- [ ] Complete the instructions in [Clone the repository](https://github.com/hackforla/devops-security/blob/main/CONTRIBUTING.md#clone-the-repository) - [ ] Submit a [new request](https://github.com/hackforla/devops-security/issues/new?assignees=&labels=enhancement&projects=&template=request-aws-iam-resources.yml) to create new AWS user account and then self-assign this issue. - [ ] Create a new branch from main by executing the command @@ -66,9 +62,13 @@ As a new member on the HfLA devops-security team, fill in the following fields a } ``` -- [ ] Stage changes in git with +- [ ] In your code editor navigate to `terraform` directory. `cd terraform` +- [ ] Execute the command `terraform init` to initialize terraform in the directory. Address any failures that arise (if any). +- [ ] 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). +- [ ] 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 for the Dynamo DB installation, which should remain in the free tier. + - [ ] ** 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). ** +- [ ] Once you have tested your changes, stage them in git with - [ ] `git status` command. - [ ] then `git add path/to/file` (you can copy from above output for the file path). - [ ] Commit the changes by executing `git commit -m "briefly describing the changes"`. - [ ] Push the changes with `git push --set-upstream origin name-of-branch` - diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 157655d..8db4e8a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -25,12 +25,7 @@ Below are guidelines for contributing to the devops-security repository hosted o - [**Installing Terraform**](#installing-terraform) - [**Creating Backend State**](#creating-backend-state) - [**Installing Terraform docs**](#installing-terraform-docs) - - [**Fork the repository**](#fork-the-repository) - [**Clone (Create) a copy on your computer**](#clone-create-a-copy-on-your-computer) - - [**Verify `origin` remote url**](#verify-origin-remote-url) - - [**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) - - [**i. Reset `origin` remote url**](#i-reset-origin-remote-url) - - [**ii. Add an `upstream` remote**](#ii-add-an-upstream-remote) - [**Create a new branch where you will work on your issue**](#create-a-new-branch-where-you-will-work-on-your-issue) - [**Terraform Setup and Execution Instructions**](#terraform-setup-and-execution-instructions) - [**Submitting changes via git and opening a PR**](#submitting-changes-via-git-and-opening-a-pr) @@ -165,29 +160,7 @@ Follow the Terraform docs [installation guide](https://terraform-docs.io/user-gu [Back to Table of Contents](#table-of-contents) *** -## **Fork the repository** - -Fork the hackforla/devops-security repository by clicking -. A fork is a copy of the repository that will be placed on your GitHub account. - -
- Click here to see a visual example of the `fork` button within the devops-security repo -

First, you find the `fork` button on the top right hand side of the [Hack for LA devops-security repo](https://github.com/hackforla/devops-security) - -

Next, a modal may open and request where you want to fork this devops-security repo. Please click on your avatar or your GitHub username

- -

- -**Note:** It should create a URL that looks like the following -> `https://github.com//devops-security`. - -**For example** -> `https://github.com/octocat/devops-security`. - -**Be Aware:** What you have created is a forked copy in a remote version on GitHub. It is not yet on your local machine. - -[Back to Table of Contents](#table-of-contents) -*** - -## **Clone (Create) a copy on your computer** +## **Clone the repository** Create a new folder in your computer that will contain `hackforla` projects. @@ -202,12 +175,7 @@ cd hackforla and run the following commands: ```bash -git clone https://github.com//devops-security.git -``` - -For example if your GitHub username was `octocat`: -```bash -git clone https://github.com/octocat/devops-security.git +git clone https://github.com/hackforla/devops-security.git ``` You should now have a new folder in your `hackforla` folder called `devops-security`. Verify this by changing into the new directory: @@ -216,49 +184,6 @@ You should now have a new folder in your `hackforla` folder called `devops-secur cd devops-security ``` -#### **Verify `origin` remote url** - -Verify that your local cloned repository is pointing to the correct `origin` URL (that is, the forked repo on your own Github account): -```bash -git remote -v -``` -You should see `fetch` and `push` URLs with links to your forked repository under your account (i.e. `https://github.com//devops-security.git`). You are all set to make working changes to the devops-security on your local machine. - -However, we still need a way to keep our local repo up to date with the deployed devops-security. To do so, you must add an upstream remote to incorporate changes made while you are working on your local repo. Run the following to add an upstream remote URL & update your local repo with recent changes to the `hackforla` version: - -```bash -git remote add upstream https://github.com/hackforla/devops-security.git -git fetch upstream -``` - -After adding the upstream remote, you should now see it if you again run `git remote -v` : -```bash -origin https://github.com//devops-security.git (fetch) -origin https://github.com//devops-security.git (push) -upstream https://github.com/hackforla/devops-security.git (fetch) -upstream https://github.com/hackforla/devops-security.git (push) -``` -#### **What if you accidentally cloned using the repository URL from the HackForLA Github (instead of the fork on your Github)?** - -##### **i. Reset `origin` remote url** - -Set your forked repo on your Github as an `origin` remote: -```bash -git remote set-url origin https://github.com//devops-security.git -``` - -For example if your GitHub username was `octocat`: -```bash -git remote set-url origin https://github.com/octocat/devops-security.git -``` - -##### **ii. Add an `upstream` remote** - -Add another remote called `upstream` that points to the `hackforla` version of the repository. This will allow you to incorporate changes later: -```bash -git remote add upstream https://github.com/hackforla/devops-security.git -``` - [Back to Table of Contents](#table-of-contents) *** @@ -322,7 +247,7 @@ terraform plan - Push changes to the remote repository, replace the `branch_name` with the name of the branch you are working on ```bash - git push --set-upstream origin main branch_name + git push --set-upstream origin branch_name ``` - Lastly open a PR to merge your changes into the `main` branch.