forked from babakDoraniArab/terraform-import-tutorial
-
Notifications
You must be signed in to change notification settings - Fork 0
/
m3_commands.txt
39 lines (26 loc) · 902 Bytes
/
m3_commands.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Configure an AWS profile with proper credentials
aws configure --profile deep-dive
# Linux or MacOS
export AWS_PROFILE=deep-dive
# Windows
$env:AWS_PROFILE="deep-dive"
# Deploy the current environment
terraform init
terraform validate
terraform plan -out m3.tfplan
terraform apply "m3.tfplan"
# Now Jimmy ruins things
# Linux and MacOS: Run the junior_admin.sh script
./junior_admin.sh
# Windows: Install the AWS PowerShell module
Install-Module AWSPowerShell.NetCore -Scope CurrentUser
# Windows: Run the JuniorAdminIssue.ps1 script
.\JuniorAdminIssue.ps1
# Update your terraform.tfvars file to comment out the current
# private_subnets, public_subnets, and subnet_count values and
# uncomment the updated values
# Run the import commands in ImportCommands.txt
terraform plan -out m3.tfplan
# There should be 3 changes where tags are added
terraform apply "m3.tfplan"
terraform destroy