rubrikinc / terraform-provider-polaris

Terraform provider for the Polaris platform
MIT License
2 stars 9 forks source link

Provider should return the Polaris/RSC FQDN and hostname as part of the attributes #86

Closed DamaniN closed 2 months ago

DamaniN commented 9 months ago

Is your feature request related to a problem? Please describe.

In some Terraform scripts, we need to reference the RSC/Polaris FQDN and/or hostname. Rather than specifying this a variable that must be managed, we would rather get it from the provider.

Describe the solution you'd like

The provider should have a data attribute that returns the FQDN of the RSC/Polaris instance. The same data resource should also return the hostname portion of the FQDN as a separate attribute. This should work in the same way that the azurerm_subscription data resource.

Describe alternatives you've considered

Using a variable to store the same information. This is cumbersome and makes the user store another element unnecessarily.

Additional context

N/A

johan3141592 commented 2 months ago

The polaris_account data source was introduced in the latest beta release (v0.9.0-beta.2), it contains the functionality asked for above. Please see the polaris_account data source documentation for additional information.

In addition to the fqdn and name fields, the data source has a third field, features, which holds all the RSC features enabled for the RSC customer account. This field has been moved from the polaris_features data source and that data source has been deprecated.