-
Notifications
You must be signed in to change notification settings - Fork 538
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #144 from thefirstofthe300/breakout-app-engine
Breakout app engine
- Loading branch information
Showing
33 changed files
with
358 additions
and
224 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# Upgrading to Project Factory v2.0 (from v1.X) | ||
|
||
The v2.0 release of Project Factory is a backwards incompatible release. It only affects users who utilize the `app_engine` argument. | ||
|
||
## Migration Instructions | ||
|
||
### App Engine Argument Changes | ||
|
||
Version 1.X of Project Factory used the `app_engine` map variable to configure App Engine: | ||
|
||
```hcl | ||
/// @file main.tf | ||
module "project-factory" { | ||
# ... | ||
app_engine { | ||
location_id = "${var.region}" | ||
auth_domain = "${var.domain}" | ||
feature_settings = [ | ||
{ | ||
split_health_checks = false | ||
}, | ||
] | ||
} | ||
} | ||
``` | ||
|
||
Version 2.X of Project Factory uses a new module named `app_engine`: | ||
|
||
```hcl | ||
/// @file main.tf | ||
module "project-factory" { | ||
# ... | ||
} | ||
module "app-engine" { | ||
source = "terraform-google-modules/project-factory/google//modules/app_engine" | ||
version = "~> 2.0" | ||
project = "${var.project_id} | ||
location_id = "${var.region}" | ||
auth_domain = "${var.domain}" | ||
feature_settings = [ | ||
{ | ||
split_health_checks = true | ||
}, | ||
] | ||
} | ||
``` | ||
|
||
### App Engine State Import | ||
|
||
The new implementation uses the `google_app_engine_application` resource which needs to be imported into the current state (make sure to replace `$YOUR_PROJECT_ID`): | ||
|
||
```sh | ||
terraform import module.app-engine.google_app_engine_application.main $YOUR_PROJECT_ID | ||
``` | ||
|
||
After importing, run `terraform` `plan` and `apply`. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/** | ||
* Copyright 2018 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 | ||
* | ||
* http://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. | ||
*/ | ||
|
||
resource "google_app_engine_application" "main" { | ||
project = "${var.project_id}" | ||
location_id = "${var.location_id}" | ||
auth_domain = "${var.auth_domain}" | ||
serving_status = "${var.serving_status}" | ||
feature_settings = "${var.feature_settings}" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/** | ||
* Copyright 2018 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 | ||
* | ||
* http://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. | ||
*/ | ||
|
||
output "name" { | ||
description = "Unique name of the app, usually apps/{PROJECT_ID}." | ||
value = "${google_app_engine_application.main.name}" | ||
} | ||
|
||
output "url_dispatch_rule" { | ||
description = "A list of dispatch rule blocks. Each block has a domain, path, and service field." | ||
value = "${google_app_engine_application.main.url_dispatch_rule}" | ||
} | ||
|
||
output "code_bucket" { | ||
description = "The GCS bucket code is being stored in for this app." | ||
value = "${google_app_engine_application.main.code_bucket}" | ||
} | ||
|
||
output "default_hostname" { | ||
description = "The default hostname for this app." | ||
value = "${google_app_engine_application.main.default_hostname}" | ||
} | ||
|
||
output "default_bucket" { | ||
description = "The GCS bucket content is being stored in for this app." | ||
value = "${google_app_engine_application.main.default_bucket}" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/** | ||
* Copyright 2018 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 | ||
* | ||
* http://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. | ||
*/ | ||
|
||
variable "project_id" { | ||
description = "The project to enable app engine on." | ||
} | ||
|
||
variable "location_id" { | ||
description = "The location to serve the app from." | ||
default = "" | ||
} | ||
|
||
variable "auth_domain" { | ||
description = "The domain to authenticate users with when using App Engine's User API." | ||
default = "" | ||
} | ||
|
||
variable "serving_status" { | ||
description = "The serving status of the app." | ||
default = "SERVING" | ||
} | ||
|
||
variable "feature_settings" { | ||
description = "A list of maps of optional settings to configure specific App Engine features." | ||
default = [] | ||
} |
Oops, something went wrong.