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: workflow guides/nginx-nic-napv5/Readme.md
+8-63
Original file line number
Diff line number
Diff line change
@@ -68,7 +68,9 @@ This workflow requires the following secrets to be configured in your GitHub rep
68
68
|`AWS_SESSION_TOKEN`| Secret | Session token for temporary AWS credentials (if using MFA) |
69
69
|`NGINX_JWT`| Secret | JSON Web Token for NGINX license authentication |
70
70
|`NGINX_Repo_CRT`| Secret | NGINX Certificate |
71
-
|`NGINX_Repo_KEY`| Secret | Private key for securing HTTPS and verifying SSL/TLS certificates |
71
+
|`NGINX_Repo_KEY`| Secret | Private key for securing HTTPS and verifying SSL/TLS certificates |
72
+
|`TF_VAR_AWS_S3_BUCKET_NAME`| Secret | Unique S3 bucket name |
73
+
|`TF_VAR_AWS_REGION`| Secret | AWS region. Note: The region should support atleast two availability zones |
72
74
### How to Add Secrets
73
75
74
76
1. Navigate to your GitHub repository
@@ -95,65 +97,8 @@ This workflow requires the following secrets to be configured in your GitHub rep
95
97
Rename `infra/terraform.tfvars.examples` to `infra/terraform.tfvars` and add the following data:
96
98
* project_prefix = "Your project identifier name in **lower case** letters only - this will be applied as a prefix to all assets"
97
99
* resource_owner = "Your-name"
98
-
* aws_region = "AWS Region" ex. us-east-1
99
-
* azs = ["us-east-1a", "us-east1b"] - Change to Correct Availability Zones based on selected Region
100
100
101
-
### STEP 3: Modify variable.tf
102
-
Modify the `S3/variable.tf` file inside the `S3 directory`:
103
-
104
-
### Example Configuration:
105
-
```hcl
106
-
variable "tf_state_bucket" {
107
-
type = string
108
-
description = "S3 bucket for Terraform state"
109
-
default = "your-unique-bucket-name"
110
-
}
111
-
```
112
-
### STEP 4: Configure Backend.tf
113
-
Add the S3 bucket name to the `Backend.tf` file in the `Infra/Backend.tf`, `eks-cluster/Backend.tf`, `Nap/Backend.tf`, `Policy/Backend.tf`, and `Arcadia/Backend.tf` directories.
114
-
115
-
### Example Configuration:
116
-
117
-
```hcl
118
-
terraform {
119
-
backend "s3" {
120
-
bucket = "your-unique-bucket-name" # Your S3 bucket name
121
-
key = "infra/terraform.tfstate" # Path to state file
122
-
region = "us-east-1" # AWS region
123
-
dynamodb_table = "terraform-lock-table" # DynamoDB table for state locking
124
-
encrypt = true
125
-
}
126
-
}
127
-
```
128
-
129
-
### STEP 5: Configuring `data.tf` for Remote State
130
-
131
-
Each `data.tf` file in the following directories needs to use the correct format:
132
-
133
-
-`eks-cluster/data.tf`
134
-
-`Nap/data.tf`
135
-
-`Policy/data.tf`
136
-
-`Arcadia/data.tf`
137
-
138
-
### Example Configuration:
139
-
140
-
```hcl
141
-
data "terraform_remote_state" "infra" {
142
-
backend = "s3"
143
-
config = {
144
-
bucket = "your-unique-bucket-name" # Your S3 bucket name
145
-
key = "infra/terraform.tfstate" # Path to your state file
146
-
region = "us-east-1" # AWS region
147
-
}
148
-
}
149
-
```
150
-
### STEP 6: Set Bucket Name
151
-
Add the name of your S3 bucket inside the and [`destroy-nic-napv5.yml`](https://github.com/f5devcentral/nginx_automation_examples/blob/main/.github/workflows/destroy-nic-napv5.yml) workflow file, which is located in the Terraform _S3 job:
The repository includes a default policy file named `policy.json`, which can be found in the `policy` directory.
159
104
@@ -175,13 +120,13 @@ Users have the option to utilize the existing policy or, if preferred, create a
175
120

176
121
177
122
178
-
### STEP 8: Commit changes
123
+
### STEP 4: Commit changes
179
124
180
125
181
126

182
127
183
128
184
-
### STEP 9: Deployment Workflow
129
+
### STEP 5: Deployment Workflow
185
130
186
131
***Step 1**: Check out a branch for the deploy workflow using the following naming convention
187
132
* nic-napv5 deployment branch: apply-nic-napv5
@@ -201,7 +146,7 @@ Users have the option to utilize the existing policy or, if preferred, create a
201
146

202
147
203
148
204
-
### STEP 10: Validation
149
+
### STEP 6: Validation
205
150
206
151
Users can now access the application through the NGINX Ingress Controller Load Balancer, which enhances security for the backend application by implementing the configured Web Application Firewall (WAF) policies. This setup not only improves accessibility but also ensures that the application is protected from various web threats.
207
152
@@ -216,7 +161,7 @@ Users can now access the application through the NGINX Ingress Controller Load B
216
161

217
162
218
163
219
-
### STEP 11: Destroy Workflow
164
+
### STEP 7: Destroy Workflow
220
165
221
166
***Step 1**: From your main branch, check out a new branch for the destroy workflow using the following naming convention
0 commit comments