Skip to content

Commit

Permalink
Add more cost reporting fields; re-generate docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
igeagonz committed Jul 22, 2024
1 parent 24e5869 commit f93b04a
Show file tree
Hide file tree
Showing 15 changed files with 350 additions and 48 deletions.
40 changes: 40 additions & 0 deletions docs/data-sources/billing_rules.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "vantage_billing_rules Data Source - terraform-provider-vantage"
subcategory: ""
description: |-
---

# vantage_billing_rules (Data Source)





<!-- schema generated by tfplugindocs -->
## Schema

### Read-Only

- `billing_rules` (Attributes List) (see [below for nested schema](#nestedatt--billing_rules))

<a id="nestedatt--billing_rules"></a>
### Nested Schema for `billing_rules`

Read-Only:

- `amount` (String) The amount for the Billing Rule (Charge).
- `category` (String) The category for the Billing Rule (Charge).
- `charge_type` (String) The charge type for the Billing Rule.
- `created_at` (String) The date and time, in UTC, the Billing Rule was created. ISO 8601 Formatted.
- `created_by_token` (String) The token of the User who created the Billing Rule.
- `percentage` (String) The percentage of the cost shown for the Billing Rule (Adjustment).
- `service` (String) The service for the Billing Rule (Charge).
- `start_period` (String) The start period for the Billing Rule (Charge).
- `sub_category` (String) The subcategory for the Billing Rule (Charge).
- `title` (String) The title of the Billing Rule.
- `token` (String)
- `type` (String) The type of the Billing Rule.


6 changes: 4 additions & 2 deletions docs/data-sources/business_metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,19 @@ description: |-

Read-Only:

- `cost_report_tokens_with_metadata` (Attributes List) The tokens for any CostReports that use the BusinessMetric, and the unit scale. (see [below for nested schema](#nestedatt--business_metrics--cost_report_tokens_with_metadata))
- `cost_report_tokens_with_metadata` (Attributes List) The tokens for any CostReports that use the BusinessMetric, the unit scale, and label filter. (see [below for nested schema](#nestedatt--business_metrics--cost_report_tokens_with_metadata))
- `created_by_token` (String) The token of the User who created the BusinessMetric.
- `title` (String) The title of the BusinessMetric.
- `token` (String) The token of the BusinessMetric.
- `values` (Attributes List) The dates and amounts for the BusinessMetric (see [below for nested schema](#nestedatt--business_metrics--values))
- `values` (Attributes List) The dates, amounts, and (optional) labels for the BusinessMetric. (see [below for nested schema](#nestedatt--business_metrics--values))

<a id="nestedatt--business_metrics--cost_report_tokens_with_metadata"></a>
### Nested Schema for `business_metrics.cost_report_tokens_with_metadata`

Read-Only:

- `cost_report_token` (String) The token of the CostReport the BusinessMetric is attached to.
- `label_filter` (String) The labels that the BusinessMetric is filtered by within a particular CostReport.
- `unit_scale` (String) Determines the scale of the BusinessMetric's values within a particular CostReport.


Expand All @@ -46,5 +47,6 @@ Read-Only:

- `amount` (String) The amount of the Business Metric Value as a string to ensure precision.
- `date` (String) The date of the Business Metric Value. ISO 8601 formatted.
- `label` (String) The label of the Business Metric Value.


7 changes: 7 additions & 0 deletions docs/data-sources/cost_reports.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,17 @@ description: |-

Read-Only:

- `chart_type` (String)
- `date_bin` (String)
- `date_interval` (String)
- `end_date` (String)
- `filter` (String)
- `folder_token` (String)
- `groupings` (String)
- `previous_period_end_date` (String)
- `previous_period_start_date` (String)
- `saved_filter_tokens` (List of String)
- `start_date` (String)
- `title` (String)
- `token` (String)
- `workspace_token` (String)
Expand Down
34 changes: 34 additions & 0 deletions docs/data-sources/managed_accounts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "vantage_managed_accounts Data Source - terraform-provider-vantage"
subcategory: ""
description: |-
---

# vantage_managed_accounts (Data Source)





<!-- schema generated by tfplugindocs -->
## Schema

### Read-Only

- `managed_accounts` (Attributes List) (see [below for nested schema](#nestedatt--managed_accounts))

<a id="nestedatt--managed_accounts"></a>
### Nested Schema for `managed_accounts`

Read-Only:

- `access_credential_tokens` (List of String) The tokens for the Access Credentials assigned to the Managed Account.
- `billing_rule_tokens` (List of String) The tokens for the Billing Rules assigned to the Managed Account.
- `contact_email` (String)
- `name` (String)
- `parent_account_token` (String) The token for the parent Account.
- `token` (String)


1 change: 1 addition & 0 deletions docs/data-sources/segments.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Read-Only:
- `filter` (String)
- `parent_segment_token` (String)
- `priority` (Number)
- `report_token` (String)
- `title` (String)
- `token` (String)
- `track_unallocated` (Boolean)
Expand Down
39 changes: 39 additions & 0 deletions docs/resources/billing_rule.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "vantage_billing_rule Resource - terraform-provider-vantage"
subcategory: ""
description: |-
---

# vantage_billing_rule (Resource)





<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `title` (String) The title of the Billing Rule.
- `type` (String) The type of the Billing Rule. Note: the values are case insensitive.

### Optional

- `amount` (Number) The credit amount for the Billing Rule. Example value: 300
- `category` (String) The category of the Billing Rule.
- `charge_type` (String) The charge type of the Billing Rule.
- `percentage` (Number) The percentage of the cost shown. Example value: 75.0
- `service` (String) The service of the Billing Rule.
- `start_period` (String) The start period of the Billing Rule.
- `sub_category` (String) The subcategory of the Billing Rule.

### Read-Only

- `created_at` (String) The date and time, in UTC, the Billing Rule was created. ISO 8601 Formatted.
- `created_by_token` (String) The token of the User who created the Billing Rule.
- `token` (String) The token of the billing rule


16 changes: 15 additions & 1 deletion docs/resources/budget.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,21 @@ description: |-




## Example Usage

```terraform
resource "vantage_budget" "demo_budget" {
name = "Demo Budget"
cost_report_token = vantage_cost_report.demo_report.token
periods = [
{
start_at = "2023-12-01"
end_at = "2024-01-01"
amount = 1000
}
]
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down
13 changes: 10 additions & 3 deletions docs/resources/cost_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,18 @@ resource "vantage_cost_report" "demo_report" {

### Optional

- `chart_type` (String) Chart type to apply to the Cost Report.
- `date_bin` (String) Date bin to apply to the Cost Report.
- `date_interval` (String) Date interval to apply to the Cost Report.
- `end_date` (String) End date to apply to the Cost Report.
- `filter` (String) Filter query to apply to the Cost Report
- `folder_token` (String) Token of the folder this report resides in.
- `folder_token` (String) Token of the folder this Cost Report resides in.
- `groupings` (String) Grouping aggregations applied to the filtered data.
- `saved_filter_tokens` (List of String) Saved filter tokens to be applied to the report.
- `workspace_token` (String) Workspace token to add the cost report to.
- `previous_period_end_date` (String) End date to apply to the Cost Report.
- `previous_period_start_date` (String) Start date to apply to the Cost Report.
- `saved_filter_tokens` (List of String) Saved filter tokens to be applied to the Cost Report.
- `start_date` (String) Start date to apply to the Cost Report.
- `workspace_token` (String) Workspace token to add the Cost Report to.

### Read-Only

Expand Down
33 changes: 33 additions & 0 deletions docs/resources/managed_account.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "vantage_managed_account Resource - terraform-provider-vantage"
subcategory: ""
description: |-
---

# vantage_managed_account (Resource)





<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `contact_email` (String) The contact email address for the Managed Account.
- `name` (String) The name of the Managed Account.

### Optional

- `access_credential_tokens` (List of String) Access Credential (aka Integrations) tokens to assign to the Managed Account.
- `billing_rule_tokens` (List of String) Billing Rule tokens to assign to the Managed Account.

### Read-Only

- `parent_account_token` (String) The token for the parent Account.
- `token` (String) The token of the managed account


1 change: 1 addition & 0 deletions docs/resources/segment.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ resource "vantage_segment" "demo_segment" {

### Read-Only

- `report_token` (String) Token of the report for this segment.
- `token` (String) Unique segment identifier


2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ require (
github.com/hashicorp/terraform-plugin-docs v0.14.1
github.com/hashicorp/terraform-plugin-framework v1.5.0
github.com/hashicorp/terraform-plugin-testing v1.6.0
github.com/vantage-sh/vantage-go v0.0.30
github.com/vantage-sh/vantage-go v0.0.35
)

require (
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,8 @@ github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk=
github.com/vantage-sh/vantage-go v0.0.30 h1:9+9SnjLDi3dWx2yN/Do0t9eZgem/Dvi359gpQ9LaXPY=
github.com/vantage-sh/vantage-go v0.0.30/go.mod h1:MsSI4gX/Wvkzo9kqWphZfE6puolmnbHcXSaoGkDCmXg=
github.com/vantage-sh/vantage-go v0.0.35 h1:FuFabVryZyBocqauSnIJo/lmQk2tNArmrWxE+JnSGGw=
github.com/vantage-sh/vantage-go v0.0.35/go.mod h1:MsSI4gX/Wvkzo9kqWphZfE6puolmnbHcXSaoGkDCmXg=
github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk=
github.com/vmihailenco/msgpack v4.0.4+incompatible h1:dSLoQfGFAo3F6OoNhwUmLwVgaUXK79GlxNBwueZn0xI=
github.com/vmihailenco/msgpack v4.0.4+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk=
Expand Down
Loading

0 comments on commit f93b04a

Please sign in to comment.