1313 * See the License for the specific language governing permissions and
1414 * limitations under the License.
1515 */
16+ locals {
17+ per_module_services = {
18+ root = [
19+ " iam.googleapis.com" ,
20+ " cloudresourcemanager.googleapis.com" ,
21+ " spanner.googleapis.com" ,
22+ ]
23+ schedule_spanner_backup = [
24+ " iam.googleapis.com" ,
25+ " cloudresourcemanager.googleapis.com" ,
26+ " storage-api.googleapis.com" ,
27+ " serviceusage.googleapis.com" ,
28+ " workflows.googleapis.com" ,
29+ " cloudscheduler.googleapis.com" ,
30+ " spanner.googleapis.com" ,
31+ " pubsub.googleapis.com" ,
32+ " logging.googleapis.com" ,
33+ " storage.googleapis.com" ,
34+ " appengine.googleapis.com" ,
35+ " cloudkms.googleapis.com" ,
36+ ]
37+ }
38+ }
1639
1740module "project" {
1841 source = " terraform-google-modules/project-factory/google"
@@ -24,18 +47,5 @@ module "project" {
2447 folder_id = var. folder_id
2548 billing_account = var. billing_account
2649
27- activate_apis = [
28- " iam.googleapis.com" ,
29- " cloudresourcemanager.googleapis.com" ,
30- " storage-api.googleapis.com" ,
31- " serviceusage.googleapis.com" ,
32- " workflows.googleapis.com" ,
33- " cloudscheduler.googleapis.com" ,
34- " spanner.googleapis.com" ,
35- " pubsub.googleapis.com" ,
36- " logging.googleapis.com" ,
37- " storage.googleapis.com" ,
38- " appengine.googleapis.com" ,
39- " cloudkms.googleapis.com" ,
40- ]
50+ activate_apis = tolist (toset (flatten (values (local. per_module_services ))))
4151}
0 commit comments