Skip to content

Commit 29f8bf3

Browse files
committed
Readme.md changes
1 parent d9fd247 commit 29f8bf3

File tree

1 file changed

+39
-4
lines changed

1 file changed

+39
-4
lines changed

README.md

Lines changed: 39 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,10 @@ tech_eazy_devops_git-user-9/
3535

3636
## ⚙️ **Prerequisites**
3737

38-
* **Fork this repository** – You must fork it to your own GitHub account so you can add secrets (you cannot add secrets to a repo you don’t own).
38+
* **Fork this repository** – You must fork it to your own GitHub account so you can add secrets (you cannot add secrets to a repo you don't own).
39+
3940
* **AWS Account** with IAM permissions to provision EC2, S3, etc.
41+
4042
* **GitHub Secrets**
4143

4244
* `AWS_ACCESS_KEY_ID` – IAM user access key
@@ -47,6 +49,41 @@ tech_eazy_devops_git-user-9/
4749

4850
---
4951

52+
## 🔒 **Private Repository Setup for Production Config**
53+
54+
For enhanced security, production configuration should be stored in a separate private repository:
55+
56+
### **Step 1: Create Private Repository**
57+
58+
1. Create a new **private repository** on GitHub (e.g., `your-username/terraform-prod-configs`)
59+
2. Copy the `prod_config.tfvars` file from `./terraform/prod_config.tfvars` in this repository
60+
3. Add the `prod_config.tfvars` file to your private repository
61+
62+
### **Step 2: Generate Personal Access Token (PAT)**
63+
64+
1. Go to GitHub Settings → Developer settings → Personal Access Tokens → Tokens (classic)
65+
2. Generate a new token with **repo** access permissions
66+
3. Copy the generated token for use in GitHub Secrets
67+
68+
### **Step 3: Configure Additional GitHub Secrets**
69+
70+
Add these secrets to your forked repository:
71+
72+
* **`PRIVATE_REPO`** – URL of your private repository
73+
```
74+
github.com/your-username/terraform-prod-configs
75+
```
76+
(note: do not keep https:// in repo link above)
77+
78+
* **`PRIVATE_REPO_KEY`** – Personal Access Token with repo access
79+
```
80+
ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
81+
```
82+
83+
⚠️ **Important**: Replace `your-username` with your actual GitHub username and ensure the private repository contains your production Terraform variables.
84+
85+
---
86+
5087
## 🔑 **Step: Configure Terraform Variables**
5188

5289
Before triggering deployment, update the Terraform configuration files for your AWS environment:
@@ -177,8 +214,6 @@ The workflow performs the following steps:
177214

178215
9. **Destroy Infrastructure** – After validation, destroys all provisioned resources and cleans up Terraform workspaces.
179216

180-
181217
This workflow fully automates the lifecycle: provisioning, deployment, validation, and cleanup, ensuring no manual intervention is needed during the process.
182218

183-
---
184-
219+
---

0 commit comments

Comments
 (0)