Skip to content

Commit

Permalink
changes and demo
Browse files Browse the repository at this point in the history
  • Loading branch information
tejavar committed May 4, 2022
1 parent 9781a62 commit f1a0882
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 3 deletions.
38 changes: 38 additions & 0 deletions demo.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/bin/bash

BRANCH="Add_GCP_Firewall_Config_${RANDOM}"

########################
# include the magic
########################
. ./demo-magic/demo-magic.sh

# hide the evidence
clear

# Run Terraform Plan
pe "terraform plan"

# Create Branch
pe "git checkout -b ${BRANCH}"

# Change Configuration
pe "vi main.tf"

# Run Terraform Plan
pe "terraform plan"

# Stage the changes
pe "git add ."

# Commit the changes
pe "git commit -m 'Update GCP Firewall Security'"

# Push the changes
pe "git push origin ${BRANCH}"

# Create Pull Request
pe "gh pr create \\
--title 'Update firewall config security' \\
--body 'This PR closes the open access' \\
--label 'enhancement'"
5 changes: 2 additions & 3 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ terraform{
}



provider "google" {
// credentials = file("./tmp/credentials2.json")

Expand All @@ -39,8 +38,8 @@ resource "google_compute_firewall" "default" {
ports = ["22"]
}

source_ranges = ["192.168.1.0/24"]
// source_ranges = ["0.0.0.0/0"]
// source_ranges = ["192.168.1.0/24"]
source_ranges = ["0.0.0.0/0"]
}

resource "google_compute_network" "default" {
Expand Down
1 change: 1 addition & 0 deletions tools/demo-magic
Submodule demo-magic added at 10abf5

0 comments on commit f1a0882

Please sign in to comment.