This repository has been archived by the owner on Nov 16, 2023. It is now read-only.
forked from appsembler/tfmodules
-
Notifications
You must be signed in to change notification settings - Fork 0
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 appsembler#27 from appsembler/gcp-projects-vm-mana…
…ger-setup gcp-project: enable VM Manager
- Loading branch information
Showing
2 changed files
with
45 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# these services are required for VM Manager, which we want to | ||
# enable on all projects. | ||
|
||
resource "google_project_service" "compute_service" { | ||
project = var.project_id | ||
service = "compute.googleapis.com" | ||
disable_dependent_services = false | ||
disable_on_destroy = false | ||
} | ||
|
||
resource "google_project_service" "containeranalysis_service" { | ||
project = var.project_id | ||
service = "containeranalysis.googleapis.com" | ||
disable_dependent_services = false | ||
disable_on_destroy = false | ||
} | ||
|
||
resource "google_project_service" "osconfig_service" { | ||
project = var.project_id | ||
service = "osconfig.googleapis.com" | ||
disable_dependent_services = false | ||
disable_on_destroy = false | ||
} | ||
|
||
resource "google_project_service" "oslogin_service" { | ||
project = var.project_id | ||
service = "oslogin.googleapis.com" | ||
disable_dependent_services = false | ||
disable_on_destroy = false | ||
} | ||
|
||
# and we need to set some project metadata to actually enable it | ||
|
||
resource "google_compute_project_metadata_item" "guestattributes" { | ||
project = var.project_id | ||
key = "enable-guest-attributes" | ||
value = "TRUE" | ||
} | ||
|
||
resource "google_compute_project_metadata_item" "osconfig" { | ||
project = var.project_id | ||
key = "enable-osconfig" | ||
value = "TRUE" | ||
} |