vmware / terraform-provider-vcf

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

Creating a 'vcf_cluster' resource requires parameters which are marked as optional in the vcf-terraform document #134

Closed cmsriram closed 7 months ago

cmsriram commented 7 months ago

Code of Conduct

Terraform

1.7

Terraform Provider

VCF provider

VMware Cloud Foundation

5.1

Description

While trying to create a VCF cluster with only the mandatory fields as per the VCF terraform document: https://registry.terraform.io/providers/vmware/vcf/latest/docs/resources/cluster, the cluster creation kept failing with a "internal server error:500". But after following this particular blog exactly with all the fields mentioned here: https://cybernils.net/2024/01/11/using-terraform-to-commission-hosts-and-creating-clusters-in-vcf/, then the VCF cluster creation was successful. So logging this issue so that it could be fixed in the VCF terraform provider document.

Affected Resources or Data Sources

Resource affected is "vcf_cluster"

Terraform Configuration

Attaching the word doc file which contains the main.tf and variables.tf terraform code copied.

VCF_Cluster-Creation-TerraformCode.docx

Debug Output

Dont have access to the debug output now as the lab instance is deleted. But the exact error was " Internal server error 500" and the API was failing to start executing.

Panic Output

No response

Expected Behavior

Expected Behavior: The vcf_cluster creation should have been successful with only the required mandatory fields as mentioned in the VCF terraform doc link: https://registry.terraform.io/providers/vmware/vcf/latest/docs/resources/cluster

Actual Behavior

Actual: The vcf_cluster creation fails when we give only the required fields as per the VCF terraform doc link.

Steps to Reproduce

  1. Create the main.tf and variables.tf file strcitly following the VCF terraform doc link: https://registry.terraform.io/providers/vmware/vcf/latest/docs/resources/cluster providing only the mandatory fields and omitting all the fields mentioned as 'optional' in the above doc link.
  2. ON executing the 'terraform apply' command, the vcf_cluster creation errors out on the console with "internal server error code 500" and the API execution fails to start. There is no logging in the logs.

Environment Details

No response

Screenshots

No response

References

No response

spacegospod commented 7 months ago

@cmsriram I replicated the scenario using the configuration you uploaded. I only modified the entity identifiers and names. My cluster was created successfully. I'm attaching the console output for reference.

If you manage to reproduce the issue again please share the log bundle from your SDDC manager appliance. It will help us identify the issue.

github-actions[bot] commented 6 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.