Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provider type mismatch #29

Open
joeybenamy opened this issue Oct 9, 2024 · 0 comments
Open

Provider type mismatch #29

joeybenamy opened this issue Oct 9, 2024 · 0 comments

Comments

@joeybenamy
Copy link

joeybenamy commented Oct 9, 2024

When I run tofu init on this code, I get a Provider type mismatch error:

provider "aws" {
  default_tags {
    tags = local.common_tags
  }
}

provider "snowflake" {
  alias = "storage_integration_role"
  authenticator = "JWT"
  role  
}

terraform {
  required_providers {
    aws = {
      source  = "hashicorp/aws"
      version = "5.65.0"
    }
    snowflake = {
      source  = "Snowflake-Labs/snowflake"
      version = "0.96.0"
    }
  }
}

module "storage_integration" {
  source  = "Snowflake-Labs/storage-integration-aws/snowflake"
  version = "0.2.10"

  prefix           = "storage-int"
  env              = var.env_name
  data_bucket_arns = ["arn:aws:s3:::di-${var.env_name}"]

  providers = {
    snowflake.storage_integration_role = snowflake.storage_integration_role
    aws                                = aws
  }
}

Error:

│ Error: Provider type mismatch

│ on snowflake-storage-integration.tf line 10, in module "storage_integration":
│ 10: snowflake.storage_integration_role = snowflake.storage_integration_role

│ The local name "snowflake.storage_integration_role" in the root module represents provider "hashicorp/snowflake", but "snowflake.storage_integration_role" in module.storage_integration
│ represents "snowflake-labs/snowflake".

│ Each provider has its own distinct configuration schema and provider types, so this module's "snowflake.storage_integration_role" can be assigned only a configuration for
│ snowflake-labs/snowflake, which is not required by module.storage_integration.

If I'm using the Snowflake-Labs/snowflake provider why am I getting an error about hashicorp/snowflake? I'm using OpenTofu 1.8.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant