vmware / terraform-provider-vcf

Terraform Provider for VMware Cloud Foundation
https://registry.terraform.io/providers/vmware/vcf/
Mozilla Public License 2.0
23 stars 10 forks source link

vcf_edge_cluster resource fails with "expected asn to be in the range (1 - -2147483648), got 65004" #120

Closed cybernils closed 9 months ago

cybernils commented 9 months ago

Code of Conduct

Terraform

v1.7.2

Terraform Provider

v0.8.0

VMware Cloud Foundation

v5.0.0.0

Description

│ Error: expected asn to be in the range (1 - -2147483648), got 65004 │ │ with vcf_edge_cluster.cluster_1, │ on main.tf line 19, in resource "vcf_edge_cluster" "cluster_1": │ 19: asn = 65004

Affected Resources or Data Sources

resource/vcf_edge_cluster

Terraform Configuration

resource "vcf_edge_cluster" "cluster_1" {
  name              = var.cluster_name
  root_password     = var.cluster_root_pass
  admin_password    = var.cluster_admin_pass
  audit_password    = var.cluster_audit_pass
  tier0_name        = "Nils-Tier-0"
  tier1_name        = "Nils-Tier-1"
  form_factor       = "MEDIUM"
  profile_type      = "DEFAULT"
  routing_type      = "EBGP"
  high_availability = "ACTIVE_ACTIVE"
  mtu               = 8940
  asn               = 65004

Debug Output

│ Error: expected asn to be in the range (1 - -2147483648), got 65004 │ │ with vcf_edge_cluster.cluster_1, │ on main.tf line 19, in resource "vcf_edge_cluster" "cluster_1": │ 19: asn = 65004

Panic Output

No response

Expected Behavior

Success.

Actual Behavior

│ Error: expected asn to be in the range (1 - -2147483648), got 65004 │ │ with vcf_edge_cluster.cluster_1, │ on main.tf line 19, in resource "vcf_edge_cluster" "cluster_1": │ 19: asn = 65004

Steps to Reproduce

terraform.exe validate

Environment Details

No response

Screenshots

No response

References

No response

spacegospod commented 9 months ago

@cybernils @tenthirtyam The top boundary for ASN is specified as 2^32 (2 to the power of 32) I see that Nils is testing on Windows, 65004 is accepted as valid on Mac. The fix should be simple, I think we can just set the boundary as a number explicitly

spacegospod commented 9 months ago

Just out of curiousity - Nils, is it possible that you're running Terraform in a 32-bit environment, a VM maybe?

cybernils commented 9 months ago

Just out of curiousity - Nils, is it possible that you're running Terraform in a 32-bit environment, a VM maybe?

Windows Server 2022 Standard. 64-bit operating system, x64-based processor. Running in a VM on vSphere 8.

cybernils commented 9 months ago

Looks like it works now after changing from:

Terraform v1.7.2 on windows_386

To:

Terraform v1.7.2 on windows_amd64

spacegospod commented 9 months ago

Thanks Nils, glad you have a workaround. This seems to be a silly mistake on my end. I will prepare a fix for the x86 binaries and will do my best do get it into the next release

cybernils commented 9 months ago

Thanks for your quick response!

github-actions[bot] commented 8 months ago

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.