terraform-google-modules / terraform-google-iam

Manages multiple IAM roles for resources on Google Cloud
https://registry.terraform.io/modules/terraform-google-modules/iam/google
Apache License 2.0
197 stars 171 forks source link

Feature: Use google-beta provider #89

Closed Lirt closed 4 years ago

Lirt commented 4 years ago

Would it be possible to allow using of google-beta provider?

Reason I ask is that IAM policies currently fail due to using newer policy version, which is not available in stable provider (https://github.com/terraform-providers/terraform-provider-google/issues/5218). I would like to specify that I want to use google-beta provider using some variable.

morgante commented 4 years ago

Could you try setting a provider alias?

provider "google-beta" {
  alias  = "gcp-beta"
}

module "example" {
  source    = "./example"
  providers = {
    google = "google-beta.gcp-beta"
  }
}
Lirt commented 4 years ago

I'm going to test it.

Lirt commented 4 years ago

It works fine, thank you.