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

Unable to create Fsx for OpenZFS Multi-AZ file system #3106

Closed
shmulikah opened this issue Dec 7, 2023 · 4 comments · Fixed by #4095
Closed

Unable to create Fsx for OpenZFS Multi-AZ file system #3106

shmulikah opened this issue Dec 7, 2023 · 4 comments · Fixed by #4095
Assignees
Labels
impact/usability Something that impacts users' ability to use the product easily and intuitively kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed

Comments

@shmulikah
Copy link

shmulikah commented Dec 7, 2023

What happened?

When trying to create Fsx filesystem for OpenZFS with deployment type: Multi-AZ, I received the following error:

  aws:fsx:OpenZfsFileSystem (fsxOpenZfs):
    error: 1 error occurred:
        * creating FSx for OpenZFS File System: BadRequest: 1 validation error detected: Value '[subnet-xxxxxxxxxxxxxxxxx,
           subnet-xxxxxxxxxxxxxxxxx]' at 'subnetIds' failed to satisfy constraint: Member must satisfy constraint: 
           [Member must have length less than or equal to 24, Member must have length greater than or equal to 15, 
           Member must satisfy regular expression pattern: ^(subnet-[0-9a-f]{8,})$]

Example


fsx_open_zfs = fsx.OpenZfsFileSystem(
                        "fsxOpenZfs",
                        subnet_ids="subnet-xxxxxxxxxxxxxxxxx,subnet-xxxxxxxxxxxxxxxxx",
                        deployment_type="MULTI_AZ_1",
                        throughput_capacity=320,
                        automatic_backup_retention_days=7,
                        storage_capacity=500,        
                        preferred_subnet_id="subnet-xxxxxxxxxxxxxxxxx",
                        disk_iops_configuration=fsx.OpenZfsFileSystemDiskIopsConfigurationArgs(
                            iops=3000,
                            mode="USER_PROVISIONED"
                        ),
                        root_volume_configuration=fsx.OpenZfsFileSystemRootVolumeConfigurationArgs(
                            data_compression_type="LZ4",
                            record_size_kib=128,
                        ),
                        weekly_maintenance_start_time="2:00:00"
                    ),

Output of pulumi about

CLI
Version 3.94.2
Go Version go1.21.4
Go Compiler gc

Plugins
NAME VERSION
aws 6.13.0
kubernetes 4.5.4

Host
OS darwin
Version 14.1
Arch arm64

This project is written in python: executable='/Library/Frameworks/Python.framework/Versions/3.11/bin/python3' version='3.11.5'

Backend
Name << REDACTED >>
URL s3://<< REDACTED >>
User xxxxxxxx
Organizations xxxxxxxx
Token type personal

Dependencies:
NAME VERSION
@pulumi/aws 6.13.0
@pulumi/pulumi 3.94.2

Additional context

Passing a list instead of a string result in a type error.
Passing only single subnet to the subnetIds resulted in another error/;

  aws:fsx:OpenZfsFileSystem (fsxOpenZfs):
    error: 1 error occurred:
        * creating FSx for OpenZFS File System: BadRequest: Exactly 2 subnet IDs are required for MULTI_AZ_1.

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

@shmulikah shmulikah added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Dec 7, 2023
@iwahbe iwahbe added impact/usability Something that impacts users' ability to use the product easily and intuitively and removed needs-triage Needs attention from the triage team labels Dec 12, 2023
@iwahbe
Copy link
Member

iwahbe commented Dec 12, 2023

Hi @shmulikah. Thanks for reporting this. I'm sorry you're hitting this error. We will try to get a fix out soon.


This is caused by enforcing a maxItemsOne: true field here:

https://github.com/pulumi/pulumi-aws/blob/08401e22ddaab298c9006c17aabb605fcaa87d0e/provider/cmd/pulumi-resource-aws/bridge-metadata.json#L10794-L10797

I see two options for a fix:

  1. Remove the maxItemsOne: true. This would fix the problem simply, but create a breaking change for all users of this field.
  2. Patch this field to split on , if present, making "subnet-xxxxxxxxxxxxxxxxx,subnet-xxxxxxxxxxxxxxxxx" a valid input.

@mikhailshilkov
Copy link
Member

@iwahbe Do you know why we have maxItemsOne: true on it? I don't see a manual annotation in resources.go, so it must be a bridge logic that goes wrong?

@mikhailshilkov
Copy link
Member

mikhailshilkov commented Jun 13, 2024

Ah, this was removed upstream in hashicorp/terraform-provider-aws@dba62f6 and we are keeping the backwards compatibility until the next major version by default

@corymhall corymhall self-assigned this Jun 13, 2024
corymhall added a commit that referenced this issue Jun 21, 2024
This PR removes the `MaxItemsOne` config for the `subnetIds` property.
Originally this was a `MaxItemsOne` property in upstream, but it was
removed when Multi-AZ support was added by AWS. In Terraform removing
`MaxItemsOne` is not a breaking change, but for Pulumi it is.

Because it looks like there is very low usage of this resource, and the
change enables a (maybe) more common use case (Multi-AZ filesystem) we
have decided to take the breaking change now.

In order to upgrade users will only need to update their code so that
`subnetIds` is now a list. For example,

From
```ts
const test = new aws.fsx.OpenZfsFileSystem("test", {
    storageCapacity: 64,
    subnetIds: test1.id,
    deploymentType: "SINGLE_AZ_1",
    throughputCapacity: 64,
});
```

To
```ts
const test = new aws.fsx.OpenZfsFileSystem("test", {
    storageCapacity: 64,
    subnetIds: [test1.id],
    deploymentType: "SINGLE_AZ_1",
    throughputCapacity: 64,
});
```

Because we are including the `TransformFromState` function, users should
not need to make any changes to the state themselves.

BREAKING CHANGE: `fsx.OpenZfsFileSystem.subnetIds` now accepts a list
instead of a string

closes #3106, closes #3034
@pulumi-bot pulumi-bot added the resolution/fixed This issue was fixed label Jun 25, 2024
@pulumi-bot
Copy link
Contributor

This issue has been addressed in PR #4095 and shipped in release v6.42.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact/usability Something that impacts users' ability to use the product easily and intuitively kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants