-
Notifications
You must be signed in to change notification settings - Fork 93
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
Add documentation for data collector, region and region enumeration data sources #283
Add documentation for data collector, region and region enumeration data sources #283
Conversation
@bhadgaonkars, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add Required
or Optional
for all arguments.
**Data collector data source by its id:** | ||
```hcl | ||
data "vra_data_collector" "snapshot" { | ||
dcId = var.data_collector_id | ||
} | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is incorrect. data_collector
data source doesn't support lookup by dcId.
} | ||
``` | ||
## Argument Reference | ||
* `dcId` - The data collector identifier. Example: d5316b00-f3b8-4895-9e9a-c4b98649c2ca |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be removed based on the above comment.
## Argument Reference | ||
* `dcId` - The data collector identifier. Example: d5316b00-f3b8-4895-9e9a-c4b98649c2ca | ||
|
||
* `name` - Data collector name. Example: Datacollector1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add (Required)
.
* `ip_address` - IPv4 Address of the data collector VM. Example: 10.0.0.1 | ||
|
||
* `hostname` - Data collector host name. Example: dc1-lnd.mycompany.com | ||
|
||
* `status` - Current status of the data collector. Example: ACTIVE, INACTIVE | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Arrange them in the sorted order please.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please arrange them in sorted order.
* `accept_self_signed_cert` - Accept self signed certificate when connecting to vSphere. Example: false | ||
|
||
* `hostname` - Host name for the cloud account endpoint. Example: dc1-lnd.mycompany.com | ||
|
||
* `password` - Password for the user used to authenticate with the cloud Account | ||
|
||
* `username` - Username to authenticate with the cloud account | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hostname
, username
and password
are required arguments and accept_self_signed_cert
is optional and has default value of false. They all need to be moved to arguments section.
data "vra_region_enumeration_azure" "this" { | ||
id = vra_region_enumeration_azure.this.id | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incorrect example. Refer to the source code / test file construct the example.
## Argument Reference | ||
|
||
* `id` - (Optional) The id of the region enumeration for Azure account. | ||
|
||
## Attribute Reference | ||
* `application_id` - Azure Client Application ID | ||
|
||
* `application_key` - Azure Client Application Secret Key | ||
|
||
* `subscription_id` - Azure Subscribtion ID | ||
|
||
* `tenant_id` - Azure Tenant ID |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
application_id
, application_key
, subscription_id
and tenant_id
are Required
arguments, so should be moved to Argument Reference section.
id
is attribute. It should be moved to Attribute Reference section.
**Region enumeration GCP data source by its id:** | ||
```hcl | ||
data "vra_region_enumeration_gcp" "this" { | ||
id = vra_region_enumeration_gcp.this.id | ||
} | ||
``` | ||
## Argument Reference | ||
|
||
* `id` - (Optional) The id of the region enumeration for GCP account. | ||
|
||
## Attribute Reference | ||
|
||
* `private_key` - GCP Private key. | ||
|
||
* `private_key_id` - GCP Private key ID. | ||
|
||
* `project_id` - GCP Project ID. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment as above. id
is attribute. client_email
, private_key
, private_key_id
, and project_id
are Required
arguments.
Correct the example as well please.
data "vra_region_enumeration_vmc" "this" { | ||
id = vra_region_enumeration_vmc.this.id | ||
} | ||
``` | ||
## Argument Reference | ||
|
||
* `id` - (Optional) The id of the region enumeration for VMC account. | ||
|
||
## Attribute Reference | ||
|
||
* `accept_self_signed_cert` - Accept self signed certificate when connecting to vSphere. Example: false | ||
|
||
* `api_token` - Host name for the cloud account endpoint. Example: dc1-lnd.mycompany.com | ||
|
||
* `dc_id` - Identifier of a data collector vm deployed in the on premise infrastructure. Refer to the data-collector API to create or list data collectors. | ||
|
||
* `vcenter_hostname` - The IP address or FQDN of the vCenter Server in the specified SDDC. The cloud proxy belongs on this vCenter. | ||
|
||
* `vcenter_password` - Password for the user used to authenticate with the cloud Account | ||
|
||
* `sddc_name` - Identifier of the on-premise SDDC to be used by this cloud account. | ||
|
||
* `vcenter_username` - vCenter user name for the specified SDDC.The specified user requires CloudAdmin credentials. The user does not require CloudGlobalAdmin credentials. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment as above. Correct the example. Organize arguments and attributes correctly.
```hcl | ||
data "vra_region_enumeration_vsphere" "this" { | ||
id = vra_region_enumeration_vsphere.this.id | ||
} | ||
``` | ||
## Argument Reference | ||
|
||
* `id` - (Optional) The id of the region enumeration for vSphere account. | ||
|
||
* `dcId` - Identifier of a data collector vm deployed in the on premise infrastructure. Example: d5316b00-f3b8-4895-9e9a-c4b98649c2ca | ||
|
||
## Attribute Reference | ||
* `accept_self_signed_cert` - Accept self signed certificate when connecting to vSphere. Example: false | ||
|
||
* `hostname` - Host name for the cloud account endpoint. Example: dc1-lnd.mycompany.com | ||
|
||
* `password` - Password for the user used to authenticate with the cloud Account | ||
|
||
* `username` - Username to authenticate with the cloud account | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment as above. Correct the example. Organize arguments and attributes correctly.
b7c7a59
to
d0961a8
Compare
@bhadgaonkars, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding
|
…ata sources Add documentation for IaaS data sources: data "vra_data_collector" data "vra_region" data "vra_region_enumeration" data "vra_region_enumeration_aws" data "vra_region_enumeration_azure" data "vra_region_enumeration_gcp" data "vra_region_enumeration_vmc" data "vra_region_enumeration_vsphere" Signed-off-by: Sagar <[email protected]>
d0961a8
to
016b789
Compare
|
||
|
||
## Attribute Reference | ||
* `id` - (Optional) The id of the region enumeration for GCP account. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to give optional for attributes.
* `ip_address` - IPv4 Address of the data collector VM. Example: 10.0.0.1 | ||
|
||
* `hostname` - Data collector host name. Example: dc1-lnd.mycompany.com | ||
|
||
* `status` - Current status of the data collector. Example: ACTIVE, INACTIVE | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please arrange them in sorted order.
|
||
This is an example of how to read a region data source. | ||
|
||
DeprecationMessage: 'region_enumeration' is deprecated. Use 'region_enumeration_vsphere' instead. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think vra_region
is deprecated. Please check and add the example.
…on data sources Add documentation for IaaS data sources: data "vra_data_collector" data "vra_region" data "vra_region_enumeration" data "vra_region_enumeration_aws" data "vra_region_enumeration_azure" data "vra_region_enumeration_gcp" data "vra_region_enumeration_vmc" data "vra_region_enumeration_vsphere" Signed-off-by: Sagar <[email protected]>
…on data sources Add documentation for IaaS data sources: data "vra_data_collector" data "vra_region" data "vra_region_enumeration" data "vra_region_enumeration_aws" data "vra_region_enumeration_azure" data "vra_region_enumeration_gcp" data "vra_region_enumeration_vmc" data "vra_region_enumeration_vsphere" Signed-off-by: Sagar <[email protected]>
Add documentation for IaaS data sources:
data "vra_data_collector"
data "vra_region"
data "vra_region_enumeration"
data "vra_region_enumeration_aws"
data "vra_region_enumeration_azure"
data "vra_region_enumeration_gcp"
data "vra_region_enumeration_vmc"
data "vra_region_enumeration_vsphere"