@@ -41,13 +41,13 @@ Edit `terraform.tfvars` with your specific values:
4141Create S3 buckets and DynamoDB table for state management:
4242``` bash
4343# Create S3 buckets for each environment
44- aws s3 mb s3://sf-website-terraform-state-dev
44+ aws s3 mb s3://sf-website-terraform-state-development
4545aws s3 mb s3://sf-website-terraform-state-staging
46- aws s3 mb s3://sf-website-terraform-state-prod
46+ aws s3 mb s3://sf-website-terraform-state-production
4747
4848# Enable versioning
4949aws s3api put-bucket-versioning \
50- --bucket sf-website-terraform-state-dev \
50+ --bucket sf-website-terraform-state-development \
5151 --versioning-configuration Status=Enabled
5252
5353# Create DynamoDB table for state locking
@@ -61,7 +61,7 @@ aws dynamodb create-table \
6161### 4. ** Initialize and Deploy**
6262``` bash
6363# Initialize with backend
64- terraform init -backend-config=backend-dev .hcl
64+ terraform init -backend-config=backend-development .hcl
6565
6666# Plan deployment
6767terraform plan
@@ -76,16 +76,16 @@ Deploy different environments using different backend configurations:
7676
7777``` bash
7878# Development
79- terraform init -backend-config=backend-dev .hcl
80- terraform apply -var-file=dev .tfvars
79+ terraform init -backend-config=backend-development .hcl
80+ terraform apply -var-file=development .tfvars
8181
8282# Staging
8383terraform init -backend-config=backend-staging.hcl
8484terraform apply -var-file=staging.tfvars
8585
8686# Production
87- terraform init -backend-config=backend-prod .hcl
88- terraform apply -var-file=prod .tfvars
87+ terraform init -backend-config=backend-production .hcl
88+ terraform apply -var-file=production .tfvars
8989```
9090
9191## 📁 ** File Structure**
@@ -138,8 +138,8 @@ sf-website-{resource-type}-{environment}
138138```
139139
140140Examples:
141- - ` sf-website-vpc-dev `
142- - ` sf-website-ecs-cluster-prod `
141+ - ` sf-website-vpc-development `
142+ - ` sf-website-ecs-cluster-production `
143143- ` sf-website-documentdb-staging `
144144
145145## 📊 ** Monitoring & Alerts**
@@ -186,7 +186,7 @@ jobs:
186186 uses : hashicorp/setup-terraform@v3
187187
188188 - name : Terraform Init
189- run : terraform init -backend-config=backend-prod .hcl
189+ run : terraform init -backend-config=backend-production .hcl
190190
191191 - name : Terraform Apply
192192 run : terraform apply -auto-approve
@@ -202,7 +202,7 @@ terraform fmt -recursive
202202terraform validate
203203
204204# Plan with specific var file
205- terraform plan -var-file=prod .tfvars
205+ terraform plan -var-file=production .tfvars
206206
207207# Show current state
208208terraform show
@@ -221,9 +221,9 @@ terraform destroy
221221
222222### ** Environment-Specific Variables**
223223Create separate tfvars files for each environment:
224- - ` dev .tfvars`
224+ - ` development .tfvars`
225225- ` staging.tfvars `
226- - ` prod .tfvars`
226+ - ` production .tfvars`
227227
228228### ** Scaling Configuration**
229229Adjust container resources and auto-scaling:
@@ -253,7 +253,7 @@ redis_node_type = "cache.r6g.large"
253253
2542541 . ** Backend bucket doesn't exist**
255255 ``` bash
256- aws s3 mb s3://sf-website-terraform-state-dev
256+ aws s3 mb s3://sf-website-terraform-state-development
257257 ```
258258
2592592 . ** Certificate ARN invalid**
@@ -285,7 +285,7 @@ redis_node_type = "cache.r6g.large"
285285## 🔄 ** Updates and Maintenance**
286286
2872871 . ** Provider Updates** : Regularly update AWS provider version
288- 2 . ** Module Updates** : Test module changes in dev first
288+ 2 . ** Module Updates** : Test module changes in development first
2892893 . ** State Backup** : S3 versioning provides automatic backups
2902904 . ** Security Updates** : Monitor AWS security bulletins
291291
0 commit comments