The 5.0 release of IAM is a backward incompatible release. The top-level interface was removed entirely in favor of using the specific resource submodules directly.
When using the root module in 4.0 you would have to specify additional
resource-specific variables, e.g. projects_bindings
, folders_bindings
etc
as follows:
module "iam" {
source = "terraform-google-modules/iam/google"
version = "~> 4.0"
projects = ["project-123456"]
projects_bindings = {
"roles/storage.admin" = [
"serviceAccount:[email protected]",
]
}
pubsub_topics_bindings = {}
pubsub_subscriptions_bindings = {}
storage_buckets_bindings = {}
subnets_bindings = {}
subnets_region = ""
organizations_bindings = {}
kms_crypto_keys_bindings = {}
kms_key_rings_bindings = {}
service_accounts_bindings = {}
folders_bindings = {}
}
The 5.0 release has deprecated the root module, so you should switch to a specific submodule, where setting defaults for *_bindings variables is dropped:
module "iam" {
- source = "terraform-google-modules/iam/google"
+ source = "terraform-google-modules/iam/google//modules/projects_iam"
- version = "~> 4.0"
+ version = "~> 5.0"
projects = ["project-123456"]
- projects_bindings = {
+ bindings = {
"roles/storage.admin" = [
"serviceAccount:[email protected]",
]
}
- pubsub_topics_bindings = {}
- pubsub_subscriptions_bindings = {}
- storage_buckets_bindings = {}
- subnets_bindings = {}
- subnets_region = ""
- organizations_bindings = {}
- kms_crypto_keys_bindings = {}
- kms_key_rings_bindings = {}
- service_accounts_bindings = {}
- folders_bindings = {}
}