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

global secondary index always recreated #17600

Closed
umeat opened this issue Mar 16, 2018 · 4 comments
Closed

global secondary index always recreated #17600

umeat opened this issue Mar 16, 2018 · 4 comments

Comments

@umeat
Copy link

umeat commented Mar 16, 2018

Terraform Version

Terraform v0.11.3

Terraform Configuration Files

resource "aws_dynamodb_table" "file-index-table" {
  name           = "${var.application}-file-index-${var.environment}"
  hash_key       = "StationId"
  range_key      = "QueryString"
  read_capacity  = 30
  write_capacity = 30

  attribute {
    name = "StationId"
    type = "S"
  }

  attribute {
    name = "QueryString"
    type = "S"
  }

  attribute {
    name = "EventId"
    type = "N"
  }

  attribute {
    name = "Position"
    type = "N"
  }

  global_secondary_index {
    name               = "EventIdIndex"
    hash_key           = "EventId"
    range_key          = "Position"
    write_capacity     = 20
    read_capacity      = 20
    projection_type    = "INCLUDE"
    non_key_attributes = ["StationId", "QueryString"]
  }

  tags {
    Name        = "File-Index-Table"
    Environment = "${var.environment}"
  }
}

Behavior

The global secondary index is destroyed and recreated when no changes have been made to it.

module.file-index.aws_dynamodb_table.file-index-table: Modifying... (ID: archive-file-index-dev)
  global_secondary_index.593012552.hash_key:             "" => "EventId"
  global_secondary_index.593012552.name:                 "" => "EventIdIndex"
  global_secondary_index.593012552.non_key_attributes.#: "0" => "2"
  global_secondary_index.593012552.non_key_attributes.0: "" => "StationId"
  global_secondary_index.593012552.non_key_attributes.1: "" => "QueryString"
  global_secondary_index.593012552.projection_type:      "" => "INCLUDE"
  global_secondary_index.593012552.range_key:            "" => "Position"
  global_secondary_index.593012552.read_capacity:        "" => "20"
  global_secondary_index.593012552.write_capacity:       "" => "20"
  global_secondary_index.611285021.hash_key:             "EventId" => ""
  global_secondary_index.611285021.name:                 "EventIdIndex" => ""
  global_secondary_index.611285021.non_key_attributes.#: "2" => "0"
  global_secondary_index.611285021.non_key_attributes.0: "QueryString" => ""
  global_secondary_index.611285021.non_key_attributes.1: "StationId" => ""
  global_secondary_index.611285021.projection_type:      "INCLUDE" => ""
  global_secondary_index.611285021.range_key:            "Position" => ""
  global_secondary_index.611285021.read_capacity:        "20" => "0"
  global_secondary_index.611285021.write_capacity:       "20" => "0"
@jmettes
Copy link
Contributor

jmettes commented Mar 18, 2018

+1

1 similar comment
@lbodor
Copy link

lbodor commented Mar 18, 2018

👍

@ghost
Copy link

ghost commented Mar 19, 2018

This issue has been automatically migrated to hashicorp/terraform-provider-aws#3828 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#3828.

@ghost
Copy link

ghost commented Apr 4, 2020

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.

@ghost ghost locked and limited conversation to collaborators Apr 4, 2020
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants