Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 0 additions & 65 deletions deploy/k8s/aks-namespaces.tf

This file was deleted.

This file was deleted.

28 changes: 0 additions & 28 deletions deploy/k8s/dns-zones.tf

This file was deleted.

12 changes: 0 additions & 12 deletions deploy/k8s/helm_release_o2bionics_webapp.tf

This file was deleted.

11 changes: 0 additions & 11 deletions deploy/k8s/helm_release_testapp.tf

This file was deleted.

27 changes: 0 additions & 27 deletions deploy/k8s/k8s-cluster.tf

This file was deleted.

12 changes: 0 additions & 12 deletions deploy/k8s/k8s_acr.tf

This file was deleted.

4 changes: 0 additions & 4 deletions deploy/k8s/main.tf

This file was deleted.

82 changes: 0 additions & 82 deletions deploy/k8s/monitoring.tf

This file was deleted.

36 changes: 0 additions & 36 deletions deploy/k8s/providers.tf

This file was deleted.

13 changes: 0 additions & 13 deletions deploy/k8s/release_external_dns.tf

This file was deleted.

9 changes: 0 additions & 9 deletions deploy/k8s/terraform.tfvars

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

# initialize terraform Azure modules
terraform init

# delete the infra
terraform destroy -auto-approve

# cleanup files
rm terraform.tfstate
rm terraform.tfstate.backup
rm tfplan
rm tfplan.json
rm -r .terraform/
45 changes: 45 additions & 0 deletions deploy/release-deploy/clouds/azure/terraform/deploy-commands.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# make sure terraform CLI is installed
terraform

# format the tf files
terraform fmt

# initialize terraform Azure modules
terraform init

# validate the template
terraform validate

# plan and save the infra changes into tfplan file
terraform plan -out tfplan

# show the tfplan file
terraform show -json tfplan
terraform show -json tfplan >> tfplan.json

# Format tfplan.json file
terraform show -json tfplan | jq '.' > tfplan.json

# show only the changes
cat tfplan.json | jq -r '(.resource_changes[] | [.change.actions[], .type, .change.after.name]) | @tsv'
cat tfplan.json | jq '[.resource_changes[] | {type: .type, name: .change.after.name, actions: .change.actions[]}]'

# apply the infra changes
terraform apply tfplan


read -t 240 -p "Press [Enter] key to start remove all resources..."


# initialize terraform Azure modules
terraform init

# delete the infra
terraform destroy -auto-approve

# cleanup files
rm terraform.tfstate
rm terraform.tfstate.backup
rm tfplan
rm tfplan.json
rm -r .terraform/
Loading