Skip to content

Commit 5d29b0a

Browse files
Data Resource Examples (#488)
* docs: DOC-976 * docs: DOC-977 * docs: DOC-978
1 parent 7d754b8 commit 5d29b0a

File tree

9 files changed

+170
-22
lines changed

9 files changed

+170
-22
lines changed
Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,38 @@
11
---
2-
# generated by https://github.com/hashicorp/terraform-plugin-docs
32
page_title: "spectrocloud_cloudaccount_aws Data Source - terraform-provider-spectrocloud"
43
subcategory: ""
54
description: |-
6-
5+
A data source for retrieving information about an AWS cloud account registered in Palette.
76
---
87

98
# spectrocloud_cloudaccount_aws (Data Source)
109

10+
A data source for retrieving information about an AWS cloud account registered in Palette.
1111

12+
## Example Usage
1213

1314

15+
You can retrieve the details of an AWS cloud registered in Palette by specifying the ID of the cloud account.
16+
17+
```hcl
18+
data "spectrocloud_cloudaccount_aws" "aws_account" {
19+
id = "45bddf48b8fc3ea6c1774886"
20+
}
21+
```
22+
23+
Alternatively, you specify the ID of the cloud account to retrieve the details of the AWS cloud.
24+
25+
```hcl
26+
data "spectrocloud_cloudaccount_aws" "aws_account" {
27+
name = "primary-aws-account"
28+
}
29+
```
1430

1531
<!-- schema generated by tfplugindocs -->
1632
## Schema
1733

1834
### Optional
1935

2036
- `depends` (String)
21-
- `name` (String)
22-
23-
### Read-Only
24-
25-
- `id` (String) The ID of this resource.
37+
- `id` (String) ID of the AWS cloud account registered in Palette.
38+
- `name` (String) Name of the AWS cloud account registered in Palette.
Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,44 @@
11
---
2-
# generated by https://github.com/hashicorp/terraform-plugin-docs
32
page_title: "spectrocloud_cloudaccount_azure Data Source - terraform-provider-spectrocloud"
43
subcategory: ""
54
description: |-
6-
5+
A data source for retrieving information about an Azure cloud account registered in Palette.
76
---
87

98
# spectrocloud_cloudaccount_azure (Data Source)
109

10+
A data source for retrieving information about an Azure cloud account registered in Palette.
1111

12+
## Example Usage
1213

1314

15+
You can retrieve the details of an Azure cloud registered in Palette by specifying the ID of the cloud account.
16+
17+
```hcl
18+
data "spectrocloud_cloudaccount_azure" "azure_account" {
19+
id = "45bddf48b8fc3ea6c1774886"
20+
}
21+
```
22+
23+
Alternatively, you specify the ID of the cloud account to retrieve the details of the Azure cloud account.
24+
25+
```hcl
26+
data "spectrocloud_cloudaccount_azure" "azure_account" {
27+
name = "primary-azure-account"
28+
}
29+
```
1430

1531
<!-- schema generated by tfplugindocs -->
1632
## Schema
1733

1834
### Optional
1935

20-
- `name` (String)
36+
- `id` (String) ID of the Azure cloud account registered in Palette.
37+
- `name` (String) Name of the Azure cloud account registered in Palette.
2138

2239
### Read-Only
2340

24-
- `azure_client_id` (String)
25-
- `azure_tenant_id` (String)
26-
- `disable_properties_request` (Boolean)
27-
- `id` (String) The ID of this resource.
28-
- `tenant_name` (String)
41+
- `azure_client_id` (String) The unique client ID from Azure Management Portal.
42+
- `azure_tenant_id` (String) The tenant ID of the Azure cloud account registered in Palette.
43+
- `disable_properties_request` (Boolean) The status of the disable properties option.
44+
- `tenant_name` (String) The name of the Azure tenant.
Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,37 @@
11
---
2-
# generated by https://github.com/hashicorp/terraform-plugin-docs
32
page_title: "spectrocloud_cloudaccount_gcp Data Source - terraform-provider-spectrocloud"
43
subcategory: ""
54
description: |-
6-
5+
A data source for retrieving information about a GCP cloud account registered in Palette.
76
---
87

98
# spectrocloud_cloudaccount_gcp (Data Source)
109

10+
A data source for retrieving information about a GCP cloud account registered in Palette.
1111

12+
## Example Usage
1213

1314

15+
You can retrieve the details of a GCP cloud registered in Palette by specifying the ID of the cloud account.
16+
17+
```hcl
18+
data "spectrocloud_cloudaccount_gcp" "gcp_account" {
19+
id = "45bddf48b8fc3ea6c1774886"
20+
}
21+
```
22+
23+
Alternatively, you specify the ID of the cloud account to retrieve the details of the GCP cloud account.
24+
25+
```hcl
26+
data "spectrocloud_cloudaccount_gcp" "gcp_account" {
27+
name = "primary-gcp-account"
28+
}
29+
```
1430

1531
<!-- schema generated by tfplugindocs -->
1632
## Schema
1733

1834
### Optional
1935

20-
- `name` (String)
21-
22-
### Read-Only
23-
24-
- `id` (String) The ID of this resource.
36+
- `id` (String) ID of the GCP cloud account registered in Palette.
37+
- `name` (String) Name of the GCP cloud account registered in Palette.

spectrocloud/data_source_cloud_account_aws.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,19 @@ import (
1313
func dataSourceCloudAccountAws() *schema.Resource {
1414
return &schema.Resource{
1515
ReadContext: dataSourceCloudAccountAwsRead,
16+
Description: "A data source for retrieving information about an AWS cloud account registered in Palette.",
1617

1718
Schema: map[string]*schema.Schema{
1819
"id": {
1920
Type: schema.TypeString,
21+
Description: "ID of the AWS cloud account registered in Palette.",
2022
Optional: true,
2123
Computed: true,
2224
ExactlyOneOf: []string{"id", "name"},
2325
},
2426
"name": {
2527
Type: schema.TypeString,
28+
Description: "Name of the AWS cloud account registered in Palette.",
2629
Optional: true,
2730
Computed: true,
2831
ExactlyOneOf: []string{"id", "name"},

spectrocloud/data_source_cloud_account_azure.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,34 +13,41 @@ import (
1313
func dataSourceCloudAccountAzure() *schema.Resource {
1414
return &schema.Resource{
1515
ReadContext: dataSourceCloudAccountAzureRead,
16+
Description: "A data source for retrieving information about an Azure cloud account registered in Palette.",
1617

1718
Schema: map[string]*schema.Schema{
1819
"azure_tenant_id": {
1920
Type: schema.TypeString,
21+
Description: "The tenant ID of the Azure cloud account registered in Palette.",
2022
Computed: true,
2123
},
2224
"azure_client_id": {
2325
Type: schema.TypeString,
26+
Description: "The unique client ID from Azure Management Portal.",
2427
Computed: true,
2528
},
2629
"id": {
2730
Type: schema.TypeString,
31+
Description: "ID of the Azure cloud account registered in Palette.",
2832
Optional: true,
2933
Computed: true,
3034
ExactlyOneOf: []string{"id", "name"},
3135
},
3236
"name": {
3337
Type: schema.TypeString,
38+
Description: "Name of the Azure cloud account registered in Palette.",
3439
Optional: true,
3540
Computed: true,
3641
ExactlyOneOf: []string{"id", "name"},
3742
},
3843
"tenant_name": {
44+
Description: "The name of the Azure tenant.",
3945
Type: schema.TypeString,
4046
Computed: true,
4147
},
4248
"disable_properties_request": {
4349
Type: schema.TypeBool,
50+
Description: "The status of the disable properties option.",
4451
Computed: true,
4552
},
4653
},

spectrocloud/data_source_cloud_account_gcp.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,19 @@ import (
1313
func dataSourceCloudAccountGcp() *schema.Resource {
1414
return &schema.Resource{
1515
ReadContext: dataSourceCloudAccountGcpRead,
16+
Description: "A data source for retrieving information about a GCP cloud account registered in Palette.",
1617

1718
Schema: map[string]*schema.Schema{
1819
"id": {
1920
Type: schema.TypeString,
21+
Description: "ID of the GCP cloud account registered in Palette.",
2022
Optional: true,
2123
Computed: true,
2224
ExactlyOneOf: []string{"id", "name"},
2325
},
2426
"name": {
2527
Type: schema.TypeString,
28+
Description: "Name of the GCP cloud account registered in Palette.",
2629
Optional: true,
2730
Computed: true,
2831
ExactlyOneOf: []string{"id", "name"},
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}"
3+
subcategory: ""
4+
description: |-
5+
{{ .Description | plainmarkdown | trimspace | prefixlines " " }}
6+
---
7+
8+
# {{.Name}} ({{.Type}})
9+
10+
{{ .Description | plainmarkdown | trimspace | prefixlines " " }}
11+
12+
## Example Usage
13+
14+
15+
You can retrieve the details of an AWS cloud registered in Palette by specifying the ID of the cloud account.
16+
17+
```hcl
18+
data "spectrocloud_cloudaccount_aws" "aws_account" {
19+
id = "45bddf48b8fc3ea6c1774886"
20+
}
21+
```
22+
23+
Alternatively, you specify the ID of the cloud account to retrieve the details of the AWS cloud.
24+
25+
```hcl
26+
data "spectrocloud_cloudaccount_aws" "aws_account" {
27+
name = "primary-aws-account"
28+
}
29+
```
30+
31+
{{ .SchemaMarkdown | trimspace }}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}"
3+
subcategory: ""
4+
description: |-
5+
{{ .Description | plainmarkdown | trimspace | prefixlines " " }}
6+
---
7+
8+
# {{.Name}} ({{.Type}})
9+
10+
{{ .Description | plainmarkdown | trimspace | prefixlines " " }}
11+
12+
## Example Usage
13+
14+
15+
You can retrieve the details of an Azure cloud registered in Palette by specifying the ID of the cloud account.
16+
17+
```hcl
18+
data "spectrocloud_cloudaccount_azure" "azure_account" {
19+
id = "45bddf48b8fc3ea6c1774886"
20+
}
21+
```
22+
23+
Alternatively, you specify the ID of the cloud account to retrieve the details of the Azure cloud account.
24+
25+
```hcl
26+
data "spectrocloud_cloudaccount_azure" "azure_account" {
27+
name = "primary-azure-account"
28+
}
29+
```
30+
31+
{{ .SchemaMarkdown | trimspace }}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}"
3+
subcategory: ""
4+
description: |-
5+
{{ .Description | plainmarkdown | trimspace | prefixlines " " }}
6+
---
7+
8+
# {{.Name}} ({{.Type}})
9+
10+
{{ .Description | plainmarkdown | trimspace | prefixlines " " }}
11+
12+
## Example Usage
13+
14+
15+
You can retrieve the details of a GCP cloud registered in Palette by specifying the ID of the cloud account.
16+
17+
```hcl
18+
data "spectrocloud_cloudaccount_gcp" "gcp_account" {
19+
id = "45bddf48b8fc3ea6c1774886"
20+
}
21+
```
22+
23+
Alternatively, you specify the ID of the cloud account to retrieve the details of the GCP cloud account.
24+
25+
```hcl
26+
data "spectrocloud_cloudaccount_gcp" "gcp_account" {
27+
name = "primary-gcp-account"
28+
}
29+
```
30+
31+
{{ .SchemaMarkdown | trimspace }}

0 commit comments

Comments
 (0)