File tree Expand file tree Collapse file tree 5 files changed +32
-7
lines changed
modules/services/cloud-bench Expand file tree Collapse file tree 5 files changed +32
-7
lines changed Original file line number Diff line number Diff line change 88EOT
99}
1010
11+ # This provider is project specific, and can only be used to provision resources in the
12+ # specified project. Primarily used for Cloud Connector and Cloud Scanning
1113provider "google" {
1214 project = var. project_id
1315 region = var. location
1416}
1517
18+ # This provider is project agnostic, and can be used to provision resources in any project,
19+ # provided the project is specified on the resource. Primarily used for Benchmarks
20+ provider "google" {
21+ alias = " multiproject"
22+ region = var. location
23+ }
24+
25+ # This provider is project agnostic, and can be used to provision resources in any project,
26+ # provided the project is specified on the resource. Primarily used for Benchmarks
1627provider "google-beta" {
17- project = var . project_id
18- region = var. location
28+ alias = " multiproject "
29+ region = var. location
1930}
2031
2132provider "sysdig" {
@@ -134,6 +145,11 @@ locals {
134145}
135146
136147module "cloud_bench" {
148+ providers = {
149+ google = google.multiproject
150+ google-beta = google- beta.multiproject
151+ }
152+
137153 count = var. deploy_bench ? 1 : 0
138154 source = " ../../modules/services/cloud-bench"
139155
Original file line number Diff line number Diff line change @@ -18,6 +18,8 @@ module "cloud_benchmark_gcp" {
1818| ------| ---------|
1919| <a name =" requirement_terraform " ></a > [ terraform] ( #requirement\_ terraform ) | >= 0.14.0 |
2020| <a name =" requirement_google " ></a > [ google] ( #requirement\_ google ) | >= 3.67.0 |
21+ | <a name =" requirement_google-beta " ></a > [ google-beta] ( #requirement\_ google-beta ) | >= 3.67.0 |
22+ | <a name =" requirement_sysdig " ></a > [ sysdig] ( #requirement\_ sysdig ) | >= 0.5.21 |
2123
2224## Providers
2325
Original file line number Diff line number Diff line change @@ -6,10 +6,6 @@ terraform {
66 source = " hashicorp/google"
77 version = " >= 3.67.0"
88 }
9- google-beta = {
10- source = " hashicorp/google-beta"
11- version = " >= 3.67.0"
12- }
139 sysdig = {
1410 source = " sysdiglabs/sysdig"
1511 version = " >= 0.5.21"
Original file line number Diff line number Diff line change @@ -20,10 +20,13 @@ locals {
2020
2121resource "sysdig_secure_cloud_account" "cloud_account" {
2222 account_id = data. google_project . project . number
23- alias = data. google_project . project . id
2423 cloud_provider = " gcp"
2524 role_enabled = " true"
2625 role_name = var. role_name
26+
27+ # Required as datasource prefixes id with '/projects/':
28+ # https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/google_project#id
29+ alias = trimprefix (data. google_project . project . id , " projects/" )
2730}
2831
2932# ##################################################
Original file line number Diff line number Diff line change @@ -6,5 +6,13 @@ terraform {
66 source = " hashicorp/google"
77 version = " >= 3.67.0"
88 }
9+ google-beta = {
10+ source = " hashicorp/google-beta"
11+ version = " >= 3.67.0"
12+ }
13+ sysdig = {
14+ source = " sysdiglabs/sysdig"
15+ version = " >= 0.5.21"
16+ }
917 }
1018}
You can’t perform that action at this time.
0 commit comments