terraform-google-modules / terraform-google-service-accounts

Creates one or more service accounts and grants them basic roles
https://registry.terraform.io/modules/terraform-google-modules/service-accounts/google
Apache License 2.0
115 stars 95 forks source link

Getting: Duplicate required providers configuration #77

Closed dsvua closed 1 year ago

dsvua commented 1 year ago

TL;DR

I have other providers, and versions.tf throws error on >=0.13 versions of terraform as in https://github.com/hashicorp/terraform/issues/25364

Expected behavior

Module just runs as I configure google provider at other place.

Observed behavior

Terraform run fails with error:

This is the error I am getting:

│ Error: Duplicate required providers configuration
│ 
│   on versions.tf line 19, in terraform:
│   19:   required_providers {
│ 
│ A module may have only one required providers configuration. The required
│ providers were previously configured at provider.tf:14,3-21.

Is it possible to remove required_providers block from versions.tf?

Terraform Configuration

I have `required_providers` block in my terraform code as I configure another provider, in particular:

terraform {
  required_providers {
    sdm = {
      source = "strongdm/sdm"
      version = ">=3.6.0"
    }
  }
}

Terraform Version

# terraform version
Terraform v1.2.5
on linux_amd64

Additional information

No response

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days