generated from hashicorp/terraform-provider-scaffolding
-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1492 from wongCH/d-improve-awscc_billingconductor…
…_pricing_rule docs: add example for: awscc_billingconductor_pricing_rule and awscc_billingconductor_pricing_plan
- Loading branch information
Showing
10 changed files
with
302 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
examples/resources/awscc_billingconductor_pricing_plan/billingconductor_pricing_plan.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
|
||
resource "awscc_billingconductor_pricing_plan" "example" { | ||
name = "HR-Rates" | ||
pricing_rule_arns = [awscc_billingconductor_pricing_rule.example.arn] | ||
|
||
tags = [ | ||
{ | ||
key = "Modified By" | ||
value = "AWSCC" | ||
} | ||
] | ||
} |
15 changes: 15 additions & 0 deletions
15
examples/resources/awscc_billingconductor_pricing_rule/billingconductor_pricing_rule.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
resource "awscc_billingconductor_pricing_rule" "example" { | ||
name = "Markup10percent" | ||
|
||
scope = "GLOBAL" | ||
type = "MARKUP" | ||
modifier_percentage = 10 | ||
|
||
tags = [ | ||
{ | ||
key = "Modified By" | ||
value = "AWSCC" | ||
} | ||
|
||
] | ||
} |
16 changes: 16 additions & 0 deletions
16
...urces/awscc_billingconductor_pricing_rule/billingconductor_pricing_rule_billing_entity.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
resource "awscc_billingconductor_pricing_rule" "example_billing_entity" { | ||
name = "MarketplaceDiscount" | ||
|
||
scope = "BILLING_ENTITY" | ||
billing_entity = "AWS Marketplace" | ||
type = "MARKUP" | ||
modifier_percentage = 5 | ||
|
||
tags = [ | ||
{ | ||
key = "Modified By" | ||
value = "AWSCC" | ||
} | ||
|
||
] | ||
} |
16 changes: 16 additions & 0 deletions
16
...es/resources/awscc_billingconductor_pricing_rule/billingconductor_pricing_rule_service.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
resource "awscc_billingconductor_pricing_rule" "example_service" { | ||
name = "S3Discount" | ||
|
||
scope = "SERVICE" | ||
service = "AmazonS3" | ||
type = "DISCOUNT" | ||
modifier_percentage = 5 | ||
|
||
tags = [ | ||
{ | ||
key = "Modified By" | ||
value = "AWSCC" | ||
} | ||
|
||
] | ||
} |
20 changes: 20 additions & 0 deletions
20
examples/resources/awscc_billingconductor_pricing_rule/billingconductor_pricing_rule_sku.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
resource "awscc_billingconductor_pricing_rule" "example_sku" { | ||
name = "DiscountEC2_T2Micro_LinuxUnix" | ||
description = "5% Discount for t2.micro on Linux/Unix in Singapore region" | ||
|
||
scope = "SKU" | ||
service = "AmazonEC2" | ||
usage_type = "APS1-BoxUsage:t2.medium" | ||
operation = "RunInstances" | ||
|
||
type = "DISCOUNT" | ||
modifier_percentage = 5 | ||
|
||
tags = [ | ||
{ | ||
key = "Modified By" | ||
value = "AWSCC" | ||
} | ||
|
||
] | ||
} |
21 changes: 21 additions & 0 deletions
21
...es/resources/awscc_billingconductor_pricing_rule/billingconductor_pricing_rule_tiering.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
resource "awscc_billingconductor_pricing_rule" "example_tiering" { | ||
name = "EnableFreeTiering" | ||
|
||
scope = "GLOBAL" | ||
type = "TIERING" | ||
|
||
tiering = { | ||
free_tier = { | ||
activated = true | ||
} | ||
} | ||
|
||
|
||
tags = [ | ||
{ | ||
key = "Modified By" | ||
value = "AWSCC" | ||
} | ||
|
||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}" | ||
subcategory: "" | ||
description: |- | ||
{{ .Description | plainmarkdown | trimspace | prefixlines " " }} | ||
--- | ||
|
||
# {{.Name}} ({{.Type}}) | ||
|
||
{{ .Description | trimspace }} | ||
|
||
## Example Usage | ||
|
||
### Pricing plan with rules | ||
This example create a billing plan and assigned the billing rules | ||
{{ tffile (printf "examples/resources/%s/billingconductor_pricing_plan.tf" .Name)}} | ||
|
||
{{ .SchemaMarkdown | trimspace }} | ||
{{- if .HasImport }} | ||
|
||
## Import | ||
|
||
Import is supported using the following syntax: | ||
|
||
{{ codefile "shell" .ImportFile }} | ||
|
||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--- | ||
page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}" | ||
subcategory: "" | ||
description: |- | ||
{{ .Description | plainmarkdown | trimspace | prefixlines " " }} | ||
--- | ||
|
||
# {{.Name}} ({{.Type}}) | ||
|
||
{{ .Description | trimspace }} | ||
|
||
## Example Usage | ||
|
||
### Pricing rule with global scope | ||
This example to create pricing rule using global scope | ||
{{ tffile (printf "examples/resources/%s/billingconductor_pricing_rule.tf" .Name)}} | ||
|
||
### Pricing rule with service scope | ||
This example create pricing rule using service scope | ||
{{ tffile (printf "examples/resources/%s/billingconductor_pricing_rule_service.tf" .Name)}} | ||
|
||
### Pricing rule with with tier type | ||
This example enable free-tier | ||
{{ tffile (printf "examples/resources/%s/billingconductor_pricing_rule_tiering.tf" .Name)}} | ||
|
||
### Pricing rule with billing entity scope | ||
This example create using billing entity scope to markup when marketplace is in use. | ||
{{ tffile (printf "examples/resources/%s/billingconductor_pricing_rule_billing_entity.tf" .Name)}} | ||
|
||
### Pricing rule with SKU scope | ||
This example provides using SKU as scope to provides discount billing item that uses t2.micro on Linux/Unix in Singapore region | ||
{{ tffile (printf "examples/resources/%s/billingconductor_pricing_rule_sku.tf" .Name)}} | ||
|
||
{{ .SchemaMarkdown | trimspace }} | ||
{{- if .HasImport }} | ||
|
||
## Import | ||
|
||
Import is supported using the following syntax: | ||
|
||
{{ codefile "shell" .ImportFile }} | ||
|
||
{{- end }} |