terraform-snowflake-storage-integration-aws icon indicating copy to clipboard operation
terraform-snowflake-storage-integration-aws copied to clipboard

Provider type mismatch

Open joeybenamy opened this issue 4 months ago • 0 comments

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.

joeybenamy avatar Oct 09 '24 19:10 joeybenamy