Skip to content

Commit

Permalink
fix: Update cleaner function to 2.0 (#905)
Browse files Browse the repository at this point in the history
* Update cleaner function to 1.6

* recreate project
  • Loading branch information
bharathkkb authored May 1, 2021
1 parent ab56841 commit 285a3e6
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
13 changes: 6 additions & 7 deletions infra/terraform/test-org/test-cleanup/cleanup.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,22 @@
* limitations under the License.
*/

module "app-engine" {
module "scheduler-app-engine" {
source = "terraform-google-modules/project-factory/google//modules/app_engine"
version = "~> 3.0"
version = "~> 10.0"
location_id = local.app_location
project_id = module.project.project_id
project_id = module.cft-manager-project.project_id
}

module "projects_cleanup" {
module "projects_cleaner" {
source = "terraform-google-modules/scheduled-function/google//modules/project_cleanup"
version = "~> 1.1"
version = "~> 2.0"

job_schedule = "17 * * * *"
max_project_age_in_hours = "6"
organization_id = local.org_id
project_id = module.project.project_id
project_id = module.cft-manager-project.project_id
region = local.region
target_excluded_labels = local.exclude_labels
target_folder_id = local.cleanup_folder
}

2 changes: 1 addition & 1 deletion infra/terraform/test-org/test-cleanup/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

output "project_id" {
value = module.project.project_id
value = module.cft-manager-project.project_id
}

output "excluded_labels" {
Expand Down
5 changes: 3 additions & 2 deletions infra/terraform/test-org/test-cleanup/project.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
* limitations under the License.
*/

module "project" {
module "cft-manager-project" {
source = "terraform-google-modules/project-factory/google"
version = "~> 3.0"
version = "~> 10.0"

name = "cft-project-manager"
random_project_id = true
Expand All @@ -28,6 +28,7 @@ module "project" {
activate_apis = [
"cloudresourcemanager.googleapis.com",
"cloudscheduler.googleapis.com",
"cloudbuild.googleapis.com",
"cloudfunctions.googleapis.com",
"pubsub.googleapis.com",
"storage-api.googleapis.com",
Expand Down
4 changes: 2 additions & 2 deletions infra/terraform/test-org/test-cleanup/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ provider "archive" {
}

provider "google" {
version = "~> 2.19"
version = "~> 3.38"
}

provider "google-beta" {
version = "~> 2.19"
version = "~> 3.38"
}

provider "null" {
Expand Down

0 comments on commit 285a3e6

Please sign in to comment.