Skip to content

Commit

Permalink
specify version constraints
Browse files Browse the repository at this point in the history
  • Loading branch information
epiccoolguy committed Feb 10, 2024
1 parent 82fc18a commit 41818b6
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 14 deletions.
9 changes: 6 additions & 3 deletions .terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 12 additions & 6 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,24 @@ locals {
}

module "folder_gh" {
source = "terraform-google-modules/folders/google"
source = "terraform-google-modules/folders/google"
version = "~> 4.0.1"

names = [local.gcp_root_folder_name]
parent = "organizations/${var.gcp_organization_id}"
}

module "folder_gh_owner" {
source = "terraform-google-modules/folders/google"
source = "terraform-google-modules/folders/google"
version = "~> 4.0.1"

names = [var.gh_owner]
parent = module.folder_gh.id
}

module "project" {
source = "terraform-google-modules/project-factory/google"
source = "terraform-google-modules/project-factory/google"
version = "~> 14.4.0"

name = var.gh_repository
random_project_id = true
Expand Down Expand Up @@ -58,7 +61,8 @@ module "workload_identity" {
}

module "folder_gh_owner_iam_bindings" {
source = "terraform-google-modules/iam/google//modules/folders_iam"
source = "terraform-google-modules/iam/google//modules/folders_iam"
version = "~> 7.7.1"

folders = [module.folder_gh_owner.id]
bindings = {
Expand All @@ -77,7 +81,8 @@ module "folder_gh_owner_iam_bindings" {
}

module "billing_account_iam_bindings" {
source = "terraform-google-modules/iam/google//modules/billing_accounts_iam"
source = "terraform-google-modules/iam/google//modules/billing_accounts_iam"
version = "~> 7.7.1"

billing_account_ids = [var.gcp_billing_account_id]
bindings = {
Expand All @@ -88,7 +93,8 @@ module "billing_account_iam_bindings" {
}

module "workload_identity_iam_bindings" {
source = "terraform-google-modules/iam/google//modules/service_accounts_iam"
source = "terraform-google-modules/iam/google//modules/service_accounts_iam"
version = "~> 7.7.1"

project = module.project.project_id
service_accounts = [module.project.service_account_email]
Expand Down
3 changes: 2 additions & 1 deletion modules/bucket/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ module "kms" {
}

module "bucket" {
source = "terraform-google-modules/cloud-storage/google"
source = "terraform-google-modules/cloud-storage/google"
version = "~> 5.0.0"

project_id = var.project_id
location = var.location
Expand Down
3 changes: 2 additions & 1 deletion modules/gh/versions.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
terraform {
required_providers {
github = {
source = "integrations/github"
source = "integrations/github"
version = "~> 5.45.0"
}
}
}
3 changes: 2 additions & 1 deletion modules/kms/main.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
module "kms" {
source = "terraform-google-modules/kms/google"
source = "terraform-google-modules/kms/google"
version = "~> 2.3.0"

project_id = var.project_id
location = var.location
Expand Down
6 changes: 4 additions & 2 deletions versions.tf
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
terraform {
required_providers {
google = {
source = "hashicorp/google"
source = "hashicorp/google"
version = "~> 5.15.0"
}
random = {
source = "hashicorp/random"
source = "hashicorp/random"
version = "~> 3.6.0"
}
}
}

0 comments on commit 41818b6

Please sign in to comment.