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

FSx Error: expected per_unit_storage_throughput to be one of [12 40 50 100 200], got 125 #22446

Closed
olileach opened this issue Jan 6, 2022 · 4 comments · Fixed by #22462
Closed
Labels
bug Addresses a defect in current functionality. service/fsx Issues and PRs that pertain to the fsx service.
Milestone

Comments

@olileach
Copy link

olileach commented Jan 6, 2022

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform CLI and Terraform AWS Provider Version

➜ terraform terraform -v
Terraform v1.1.2
on darwin_arm64
provider registry.terraform.io/hashicorp/aws v3.70.0

Affected Resource(s)

  • aws_fsx_lustre_file_system

Terraform Configuration Files

Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.

terraform {
  required_providers {
    aws = {
      source  = "hashicorp/aws"
      version = "~> 3.0"
    }
  }
}

# Configure the AWS Provider
provider "aws" {
  region = "us-east-1"
}

resource "aws_fsx_lustre_file_system" "fsx-filesystem-1" {
  import_path      = "s3://bucket-us-east-1"
  storage_capacity = 1200
  storage_type = "SSD"
  per_unit_storage_throughput = "125"
  deployment_type = "PERSISTENT_1"
  subnet_ids       = ["subnet-xxxxx"]
}

Debug Output

Here is the output of the plan

➜  terraform terraform plan
╷
│ Error: expected per_unit_storage_throughput to be one of [12 40 50 100 200], got 125
│
│   with aws_fsx_lustre_file_system.fsx-filesystem-1,
│   on fsx.tf line 19, in resource "aws_fsx_lustre_file_system" "fsx-filesystem-1":
│   19:   per_unit_storage_throughput = "125"

Expected Behavior

AWS Provider should be able to except the new FSx options being rolled out in AWS, starting with us-east-1

Throughput per unit of storage Info
Throughput (MB/s) per unit of storage (TiB)
125 MB/s/TiB
250 MB/s/TiB
500 MB/s/TiB
1000 MB/s/TiB

Actual Behavior

Did not except my value of 125 as it's not an expected option ([12 40 50 100 200])

Steps to Reproduce

  1. Take the example tf file above.
  2. terraform plan | apply
@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. service/fsx Issues and PRs that pertain to the fsx service. labels Jan 6, 2022
@olileach
Copy link
Author

olileach commented Jan 6, 2022

If I run terraform using an expected config, it does create the FSx File system using the latest options available in that region.

resource "aws_fsx_lustre_file_system" "fsx-filesystem-1" {
  import_path      = "s3://bucket-us-east-1"
  storage_capacity = 1200
  storage_type = "SSD"
  per_unit_storage_throughput = "100"
  deployment_type = "PERSISTENT_1"
  subnet_ids       = ["subnet-xxxx"]
} 

What gets deployed in the UI:

Throughput per unit of storage = 100 MB/s/TiB
Total throughput = 120 MB/s

Seems like this is a cosmetic but breaking change.

@olileach
Copy link
Author

olileach commented Jan 6, 2022

It looks like these values are hardcoded, coming from https://github.com/hashicorp/terraform-provider-aws/blob/main/internal/service/fsx/lustre_file_system.go#L144

			"per_unit_storage_throughput": {
				Type:     schema.TypeInt,
				Optional: true,
				ForceNew: true,
				ValidateFunc: validation.IntInSlice([]int{
					12,
					40,
					50,
					100,
					200,
				}),
			},

@DrFaust92 DrFaust92 added bug Addresses a defect in current functionality. and removed needs-triage Waiting for first response or review from a maintainer. labels Jan 7, 2022
@github-actions github-actions bot added this to the v3.72.0 milestone Jan 7, 2022
@github-actions
Copy link

This functionality has been released in v3.72.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

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 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/fsx Issues and PRs that pertain to the fsx service.
Projects
None yet
2 participants