From 8ab3bb314b6b387a8f9ffbed23d311d8acc6f37f Mon Sep 17 00:00:00 2001 From: Manu Chandrasekhar Date: Tue, 2 Jul 2024 22:38:49 -0400 Subject: [PATCH] docs: added example for awscc_billingconductor_custom_line_item --- .../billingconductor_custom_line_item.md | 30 +++++++++++++++++-- .../billingconductor_custom_line_item.tf | 22 ++++++++++++++ .../billingconductor_custom_line_item.md.tmpl | 25 ++++++++++++++++ 3 files changed, 74 insertions(+), 3 deletions(-) create mode 100644 examples/resources/awscc_billingconductor_custom_line_item/billingconductor_custom_line_item.tf create mode 100644 templates/resources/billingconductor_custom_line_item.md.tmpl diff --git a/docs/resources/billingconductor_custom_line_item.md b/docs/resources/billingconductor_custom_line_item.md index ab20cc69fb..c9ffba1fd9 100644 --- a/docs/resources/billingconductor_custom_line_item.md +++ b/docs/resources/billingconductor_custom_line_item.md @@ -1,5 +1,4 @@ --- -# generated by https://github.com/hashicorp/terraform-plugin-docs page_title: "awscc_billingconductor_custom_line_item Resource - terraform-provider-awscc" subcategory: "" description: |- @@ -10,7 +9,32 @@ description: |- A custom line item is an one time charge that is applied to a specific billing group's bill. - +## Example Usage + +```terraform +resource "awscc_billingconductor_custom_line_item" "example" { + billing_group_arn = awscc_billingconductor_billing_group.example.arn + name = "example" + description = "Example description" + account_id = "123456789012" + custom_line_item_charge_details = { + flat = { + charge_value = 1 + } + type = "FEE" + } + billing_period_range = { + inclusive_start_billing_period = "2024-07" + } + tags = [ + { + key = "Modified By" + value = "AWSCC" + } + ] + +} +``` ## Schema @@ -105,4 +129,4 @@ Import is supported using the following syntax: ```shell $ terraform import awscc_billingconductor_custom_line_item.example -``` +``` \ No newline at end of file diff --git a/examples/resources/awscc_billingconductor_custom_line_item/billingconductor_custom_line_item.tf b/examples/resources/awscc_billingconductor_custom_line_item/billingconductor_custom_line_item.tf new file mode 100644 index 0000000000..2a81aeb875 --- /dev/null +++ b/examples/resources/awscc_billingconductor_custom_line_item/billingconductor_custom_line_item.tf @@ -0,0 +1,22 @@ +resource "awscc_billingconductor_custom_line_item" "example" { + billing_group_arn = awscc_billingconductor_billing_group.example.arn + name = "example" + description = "Example description" + account_id = "123456789012" + custom_line_item_charge_details = { + flat = { + charge_value = 1 + } + type = "FEE" + } + billing_period_range = { + inclusive_start_billing_period = "2024-07" + } + tags = [ + { + key = "Modified By" + value = "AWSCC" + } + ] + +} diff --git a/templates/resources/billingconductor_custom_line_item.md.tmpl b/templates/resources/billingconductor_custom_line_item.md.tmpl new file mode 100644 index 0000000000..38c03428f0 --- /dev/null +++ b/templates/resources/billingconductor_custom_line_item.md.tmpl @@ -0,0 +1,25 @@ +--- +page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}" +subcategory: "" +description: |- +{{ .Description | plainmarkdown | trimspace | prefixlines " " }} +--- + +# {{.Name}} ({{.Type}}) + +{{ .Description | trimspace }} + +## Example Usage + +{{ tffile (printf "examples/resources/%s/billingconductor_custom_line_item.tf" .Name)}} + +{{ .SchemaMarkdown | trimspace }} +{{- if .HasImport }} + +## Import + +Import is supported using the following syntax: + +{{ codefile "shell" .ImportFile }} + +{{- end }} \ No newline at end of file