hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.87k stars 9.21k forks source link

[Bug]: aws_fsx_ontap_file_system for SINGLE_AZ_2 keeps trying to update throughput_capacity #38663

Open miguelhar opened 4 months ago

miguelhar commented 4 months ago

Terraform Core Version

1.9.3

AWS Provider Version

5.61.0

Affected Resource(s)

resource "aws_fsx_ontap_file_system" "v2" {
  storage_capacity    = 1024
  subnet_ids          = [aws_subnet.main.id]
  deployment_type     = "SINGLE_AZ_2"
  preferred_subnet_id = aws_subnet.main.id
  throughput_capacity = 1536
}

Expected Behavior

Same behavior as deployment_type = SINGLE_AZ_1 where throughput_capacity should not be trying to perpetually update.

Actual Behavior

Plan shows ~ throughput_capacity = 0 -> 1536

aws_fsx_ontap_file_system.v2: Refreshing state... [id=fs-0f228a513fa1da191]
aws_fsx_ontap_file_system.v1: Refreshing state... [id=fs-0d161cf0b3d8a72d3]

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the
following symbols:
  ~ update in-place

Terraform will perform the following actions:

  # aws_fsx_ontap_file_system.v2 will be updated in-place
  ~ resource "aws_fsx_ontap_file_system" "v2" {
        id                                = "fs-0f228a513fa1da191"
        tags                              = {}
      ~ throughput_capacity               = 0 -> 1536
        # (21 unchanged attributes hidden)

        # (1 unchanged block hidden)
    }

Plan: 0 to add, 1 to change, 0 to destroy.

Relevant Error/Panic Output Snippet

No response

Terraform Configuration Files

provider "aws" {
  region = "us-west-2"
}

resource "aws_vpc" "main" {
  cidr_block = "10.0.0.0/16"
}

resource "aws_subnet" "main" {
  vpc_id            = aws_vpc.main.id
  cidr_block        = "10.0.1.0/24"
  availability_zone = "us-west-2a"
}

## FSX V1
resource "aws_fsx_ontap_file_system" "v1" {
  storage_capacity    = 1024
  subnet_ids          = [aws_subnet.main.id]
  deployment_type     = "SINGLE_AZ_1"
  preferred_subnet_id = aws_subnet.main.id
  throughput_capacity = 1024
}

## FSX V2
resource "aws_fsx_ontap_file_system" "v2" {
  storage_capacity    = 1024
  subnet_ids          = [aws_subnet.main.id]
  deployment_type     = "SINGLE_AZ_2"
  preferred_subnet_id = aws_subnet.main.id
  throughput_capacity = 1536
}

Steps to Reproduce

  1. terraform apply --auto-approve
  2. After changes are created run terraform plan
  3. Terraform will show a planned update for the aws_fsx_ontap_file_system of type SINGLE_AZ_2
# aws_fsx_ontap_file_system.v2 will be updated in-place
  ~ resource "aws_fsx_ontap_file_system" "v2" {
        id                                = "fs-0f228a513fa1da191"
        tags                              = {}
      ~ throughput_capacity               = 0 -> 1536
        # (21 unchanged attributes hidden)

        # (1 unchanged block hidden)
    }

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

None

github-actions[bot] commented 4 months ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue