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

fix the string validator for rack names #284

Merged
merged 1 commit into from
Aug 18, 2023
Merged

fix the string validator for rack names #284

merged 1 commit into from
Aug 18, 2023

Conversation

rajagopalans
Copy link
Collaborator

I discovered this limit while writing configs for the AI racks.

chrismarget-j
chrismarget-j previously approved these changes Aug 14, 2023
@chrismarget-j chrismarget-j self-requested a review August 17, 2023 22:13
@chrismarget-j chrismarget-j dismissed their stale review August 17, 2023 22:14

string length may be an issue.

Copy link
Collaborator

@chrismarget-j chrismarget-j left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that "between" might need to be 0-18.

Warrants an experiment at least.

@rajagopalans
Copy link
Collaborator Author

rajagopalans commented Aug 18, 2023

I think that "between" might need to be 0-18.

Warrants an experiment at least.

│ Error: Invalid Attribute Value Length

│ with apstra_rack_type.AI_16xA100,
│ on racks.tf line 30, in resource "apstra_rack_type" "AI_16xA100":
│ 30: name = "012345678901234567"

│ Attribute name string length must be between 1 and 17, got: 18

Admittedly confusing, but works :-)

rsubrahmania@rsubrahmania-mbp test % terraform plan

│ Warning: Provider development overrides are in effect

│ The following provider development overrides are set in the CLI configuration:
│ - juniper/apstra in /Users/rsubrahmania/go/bin

│ The behavior may therefore not match any released version of the provider and applying changes may cause the state to become incompatible with published
│ releases.


│ Error: Invalid Attribute Value Length

│ with apstra_rack_type.AI_32xA100,
│ on racks.tf line 143, in resource "apstra_rack_type" "AI_32xA100":
│ 143: name = ""

│ Attribute name string length must be between 1 and 17, got: 0

1 and 17 length strings work fine

@chrismarget-j chrismarget-j self-requested a review August 18, 2023 20:00
Copy link
Collaborator

@chrismarget-j chrismarget-j left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It must have been the Go doc comment which led me to believe 0-18 was the appropriate value.

Upstream PR:
hashicorp/terraform-plugin-framework-validators#157

And we now have #304

@rajagopalans rajagopalans merged commit 96832e5 into main Aug 18, 2023
@rajagopalans rajagopalans deleted the issues/283 branch August 18, 2023 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants