Error when adding tags to Snowflake resource (role)

Viewed 9

I am using:

Terraform v1.2.9 on windows_amd64

  • provider registry.terraform.io/snowflake-labs/snowflake v0.42.1

My main.tf file is:

terraform {
  required_version = ">= 1.1.7"
  backend "http" {
  }
  required_providers {
    snowflake = {
      source  = "Snowflake-Labs/snowflake"
      version = "~> 0.42"
    }
  }
}

provider "snowflake" {
  username = "xxxxxx"
  account  = "yyyyyy"
  region   = "canada-central.azure"
}

When I add the following tags to a Snowflake role, I have an error. Can you help?

resource "snowflake_role" "operations_manager" {
  name    = "OPERATIONS_MANAGER"
  comment = "A comment"
  tag = {
    managed-with = "Terraform",
    owner        = "Joe Smith"
  }
}
Error: Unsupported argument
│
│   on functional_roles.tf line 35, in resource "snowflake_role" "operations_manager":
│   35:   tag = {
│
│ An argument named "tag" is not expected here. Did you mean to define a block of type "tag"?
0 Answers
Related