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 Rotate credentials fails in prevalidation with error "Entity name 10.0.0.30 not found" when using resource IP #139

Closed cmsriram closed 8 months ago

cmsriram commented 8 months ago

Code of Conduct

Terraform

1.7

Terraform Provider

VCF provider

VMware Cloud Foundation

5.1

Description

Testing the 'vcf_credentials_rotate' its found that it works only when using the resource FQDN but not the IP address. Tested this on both the nsxt manager and the vCenter and it throws the below error in prevalidation of the task :

Description Prevalidation of password rotate request Progress Messages Entity name 10.0.0.30 not found. Error

Message: Entity name 10.0.0.30 not found. Remediation Message: Use a valid entity name.

Affected Resources or Data Sources

vCenter and the NSXT managers

Terraform Configuration

Attaching the word doc with the code for main.tf and variables.tf files. VCF-Credentials-Rotate.docx

Debug Output

Description Prevalidation of password rotate request Progress Messages Entity name 10.0.0.30 not found. Error

Message: Entity name 10.0.0.30 not found. Remediation Message: Use a valid entity name.

Reference Token: SMJN21

Cause: Entity name 10.0.0.30 not found.

Panic Output

No response

Expected Behavior

The vcf_credentials_rotate task should work with resource IP's.

Actual Behavior

Its observed that the task fails in VCF with the below errors :

Description Prevalidation of password rotate request Progress Messages Entity name 10.0.0.30 not found. Error

Message: Entity name 10.0.0.30 not found. Remediation Message: Use a valid entity name.

Reference Token: SMJN21

Steps to Reproduce

  1. Execute the 'vcf_credentials_rotate' resource with 'resource_name' field being set to the IP address of the resource instead of FQDN.
  2. Its observed that the task fails in VCF with the below errors :

Description Prevalidation of password rotate request Progress Messages Entity name 10.0.0.30 not found. Error

Message: Entity name 10.0.0.30 not found. Remediation Message: Use a valid entity name.

Reference Token: SMJN21

Environment Details

No response

Screenshots

No response

References

No response

spacegospod commented 8 months ago

The terraform resource does not do any validation on the entity name. It just populates it in the specification and calls the VCF API to rotate the credentials.

@cmsriram did you observe an error in the SDDC manager? Or was it just a problem with "terraform apply"?

If the former was true it would be useful to share the logs from the SDDC manager. I will close the issue for now since it does not seem to be caused by the provider.

cmsriram commented 8 months ago

@stoyanzhelyazkov I observed the issue in the SDDC manager with the task failing. That is how thought of tracking this issue here. Will repro and provide the logs.

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