Skip to content
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

Merged

Conversation

bhadgaonkars
Copy link
Contributor

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"

@vmwclabot
Copy link
Member

@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 Signed-off-by: John Doe <[email protected]> to the last line of each Git commit message. The e-mail address used to sign must match the e-mail address of the Git author. Click here to view the Developer Certificate of Origin agreement.

@vmwclabot vmwclabot added the dco-required DCO Required label Nov 24, 2020
Copy link
Contributor

@dmettem dmettem left a 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.

Comment on lines 12 to 17
**Data collector data source by its id:**
```hcl
data "vra_data_collector" "snapshot" {
dcId = var.data_collector_id
}
```
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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

Copy link
Contributor

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.

Copy link
Contributor

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.

Comment on lines 18 to 38
* `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

Copy link
Contributor

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.

Comment on lines 14 to 16
data "vra_region_enumeration_azure" "this" {
id = vra_region_enumeration_azure.this.id
}
Copy link
Contributor

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.

Comment on lines 18 to 29
## 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
Copy link
Contributor

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.

Comment on lines 12 to 28
**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.
Copy link
Contributor

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.

Comment on lines 14 to 36
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.
Copy link
Contributor

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.

Comment on lines 13 to 42
```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

Copy link
Contributor

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.

@bhadgaonkars bhadgaonkars force-pushed the docs-for-dc-region-and-region-enum-ds branch from b7c7a59 to d0961a8 Compare December 12, 2020 04:05
@vmwclabot
Copy link
Member

@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 Signed-off-by: John Doe <[email protected]> to the last line of each Git commit message. The e-mail address used to sign must match the e-mail address of the Git author. Click here to view the Developer Certificate of Origin agreement.

…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]>
@bhadgaonkars bhadgaonkars force-pushed the docs-for-dc-region-and-region-enum-ds branch from d0961a8 to 016b789 Compare December 12, 2020 04:11
@vmwclabot vmwclabot removed the dco-required DCO Required label Dec 12, 2020


## Attribute Reference
* `id` - (Optional) The id of the region enumeration for GCP account.
Copy link
Contributor

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

Copy link
Contributor

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.
Copy link
Contributor

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]>
@dmettem dmettem merged commit ed1e4cd into vmware:master Dec 12, 2020
@vmware vmware locked and limited conversation to collaborators Jul 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants