generated from hashicorp/terraform-provider-scaffolding
-
Notifications
You must be signed in to change notification settings - Fork 40
/
azure_cloud_cost_data_source.go
72 lines (67 loc) · 1.92 KB
/
azure_cloud_cost_data_source.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
package connector
import (
"github.com/harness/terraform-provider-harness/helpers"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)
func DataSourceConnectorAzureCloudCost() *schema.Resource {
resource := &schema.Resource{
Description: "Datasource for looking up an Azure Cloud Cost Connector.",
ReadContext: resourceConnectorAzureCloudCostRead,
Schema: map[string]*schema.Schema{
"features_enabled": {
Description: "Indicates which feature to enable among Billing, Optimization, and Visibility.",
Type: schema.TypeSet,
Computed: true,
Elem: &schema.Schema{
Type: schema.TypeString,
},
},
"tenant_id": {
Description: "Tenant id.",
Type: schema.TypeString,
Computed: true,
},
"subscription_id": {
Description: "Subsription id.",
Type: schema.TypeString,
Computed: true,
},
"billing_export_spec": {
Description: "Returns billing details for the Azure account.",
Type: schema.TypeList,
Computed: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"storage_account_name": {
Description: "Name of the storage account.",
Type: schema.TypeString,
Computed: true,
},
"container_name": {
Description: "Name of the container.",
Type: schema.TypeString,
Computed: true,
},
"directory_name": {
Description: "Name of the directory.",
Type: schema.TypeString,
Computed: true,
},
"report_name": {
Description: "Name of the report.",
Type: schema.TypeString,
Computed: true,
},
"subscription_id": {
Description: "Subsription Id.",
Type: schema.TypeString,
Computed: true,
},
},
},
},
},
}
helpers.SetMultiLevelDatasourceSchemaIdentifierRequired(resource.Schema)
return resource
}