Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testing changes #809

Open
wants to merge 14 commits into
base: dev
Choose a base branch
from
Open
6 changes: 4 additions & 2 deletions cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,18 +75,20 @@ steps:
# [END tf-plan]

# [START tf-apply]
- id: 'tf apply'
- id: 'tf destroy'
name: 'hashicorp/terraform:1.0.0'
entrypoint: 'sh'
args:
- '-c'
- |
if [ -d "environments/$BRANCH_NAME/" ]; then
cd environments/$BRANCH_NAME
terraform apply -auto-approve
terraform destroy -auto-approve
else
echo "***************************** SKIPPING APPLYING *******************************"
echo "Branch '$BRANCH_NAME' does not represent an official environment."
echo "*******************************************************************************"
fi
# [END tf-apply]
options:
logging: CLOUD_LOGGING_ONLY
2 changes: 1 addition & 1 deletion environments/dev/backend.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

terraform {
backend "gcs" {
bucket = "PROJECT_ID-tfstate"
bucket = "aksgkelearning-tfstate"
prefix = "env/dev"
}
}
2 changes: 1 addition & 1 deletion environments/dev/terraform.tfvars
Original file line number Diff line number Diff line change
@@ -1 +1 @@
project="PROJECT_ID"
project="aksgkelearning"
4 changes: 2 additions & 2 deletions environments/dev/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

#

terraform {
required_version = "~> 1.0.0"
}
}
2 changes: 1 addition & 1 deletion environments/prod/backend.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

terraform {
backend "gcs" {
bucket = "PROJECT_ID-tfstate"
bucket = "aksgkelearning-tfstate"
prefix = "env/prod"
}
}
2 changes: 1 addition & 1 deletion environments/prod/terraform.tfvars
Original file line number Diff line number Diff line change
@@ -1 +1 @@
project="PROJECT_ID"
project="aksgkelearning"
2 changes: 1 addition & 1 deletion modules/firewall/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ resource "google_compute_firewall" "allow-http" {
ports = ["80"]
}

target_tags = ["http-server2"]
target_tags = ["http-server"]
source_ranges = ["0.0.0.0/0"]
}