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

Dev 2 gcp #791

Open
wants to merge 10 commits into
base: dev
Choose a base branch
from
Open
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
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 = "kms-protected-bucket"
prefix = "env/dev"
}
}
74 changes: 37 additions & 37 deletions environments/dev/main.tf
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
# Copyright 2019 Google LLC
## Copyright 2019 Google LLC
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
## You may obtain a copy of the License at
##
## https://www.apache.org/licenses/LICENSE-2.0
##
## Unless required by applicable law or agreed to in writing, software
## distributed under the License is distributed on an "AS IS" BASIS,
## 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.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#locals {
# env = "dev"
#}
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# 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.


locals {
env = "dev"
}

provider "google" {
project = "${var.project}"
}

module "vpc" {
source = "../../modules/vpc"
project = "${var.project}"
env = "${local.env}"
}

module "http_server" {
source = "../../modules/http_server"
project = "${var.project}"
subnet = "${module.vpc.subnet}"
}

module "firewall" {
source = "../../modules/firewall"
project = "${var.project}"
subnet = "${module.vpc.subnet}"
}
#provider "google" {
# project = "${var.project}"
#}
#
#module "vpc" {
# source = "../../modules/vpc"
# project = "${var.project}"
# env = "${local.env}"
#}
#
#module "http_server" {
# source = "../../modules/http_server"
# project = "${var.project}"
# subnet = "${module.vpc.subnet}"
#}
#
#module "firewall" {
# source = "../../modules/firewall"
# project = "${var.project}"
# subnet = "${module.vpc.subnet}"
#}
38 changes: 19 additions & 19 deletions environments/dev/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,22 @@
# limitations under the License.


output "network" {
value = "${module.vpc.network}"
}

output "subnet" {
value = "${module.vpc.subnet}"
}

output "firewall_rule" {
value = "${module.firewall.firewall_rule}"
}

output "instance_name" {
value = "${module.http_server.instance_name}"
}

output "external_ip" {
value = "${module.http_server.external_ip}"
}
#output "network" {
# value = "${module.vpc.network}"
#}
#
#output "subnet" {
# value = "${module.vpc.subnet}"
#}
#
#output "firewall_rule" {
# value = "${module.firewall.firewall_rule}"
#}
#
#output "instance_name" {
# value = "${module.http_server.instance_name}"
#}
#
#output "external_ip" {
# value = "${module.http_server.external_ip}"
#}
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="docker-project-403012"
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 = "kms-protected-bucket"
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="docker-project-403012"