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

aws_elasticache_subnet_group missing tags property #28380

Closed
NJITman opened this issue Apr 15, 2021 · 2 comments
Closed

aws_elasticache_subnet_group missing tags property #28380

NJITman opened this issue Apr 15, 2021 · 2 comments
Labels
bug new new issue not yet triaged provider/aws

Comments

@NJITman
Copy link

NJITman commented Apr 15, 2021

The aws_elasticache_subnet_group resource is missing the tags argument. The tags can be entered using the AWS console or via the AWS CLI or API.

[Terraform Docs] (https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/elasticache_subnet_group)

[AWS CLI2 Docs] (https://awscli.amazonaws.com/v2/documentation/api/latest/reference/elasticache/create-cache-subnet-group.html)

[AWS API Docs] (https://docs.aws.amazon.com/AmazonElastiCache/latest/APIReference/API_CreateCacheSubnetGroup.html)

Example resource block with tags argument added using list format shown in AWS CLI2 doc.

locals {
  cluster_name = "redis-dev"
  private_subnet_ids = [ "subnet-03020100" ]
}

resource "aws_elasticache_subnet_group" "subnet_group" {
  name        = "subnet-group-${local.cluster_name}"
  description = "Subnet Group (${local.cluster_name})"
  subnet_ids  = local.private_subnet_ids
  tags = [
    {
      "key"                 = "Name"
      "value"               = "subnet-group-${local.cluster_name}"
    }
  ]

Terraform Version

Terraform v0.14.10
+ provider registry.terraform.io/hashicorp/aws v3.35.0
+ provider registry.terraform.io/hashicorp/random v3.1.0
+ provider registry.terraform.io/hashicorp/template v2.2.0

Terraform Configuration Files

terraform {
  backend "s3" {
    bucket         = "bucket_name"
    key            = "terraform-state.tf"
    dynamodb_table = table_name"
  }
  required_providers {
    aws = {
      version = ">= 3.34.0"
      source  = "hashicorp/aws"
    }
  }
}

Debug Output

Error: Unsupported argument

  on modules\redis\main.tf line 13, in resource "aws_elasticache_subnet_group" "subnet_group":
  13:   tags = [

An argument named "tags" is not expected here.

Expected Behavior

Terraform should have created the subnet group resource with the associated tags.

Actual Behavior

Terraform failed with an error (see above).

Steps to Reproduce

  1. terraform init
  2. terraform plan
@ghost
Copy link

ghost commented Apr 15, 2021

This issue has been automatically migrated to hashicorp/terraform-provider-aws#18884 because it looks like an issue with that provider. If you believe this is not an issue with the provider, please reply to hashicorp/terraform-provider-aws#18884.

@github-actions
Copy link
Contributor

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 16, 2021
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug new new issue not yet triaged provider/aws
Projects
None yet
Development

No branches or pull requests

2 participants