File tree Expand file tree Collapse file tree 3 files changed +20
-17
lines changed
examples/metering_computation/usage
internal/service/metering_computation Expand file tree Collapse file tree 3 files changed +20
-17
lines changed Original file line number Diff line number Diff line change 55variable "tenancy_ocid" {
66}
77
8- variable "user_ocid" {
9- }
10-
11- variable "fingerprint" {
12- }
13-
14- variable "private_key_path" {
15- }
16-
17- variable "compartment_ocid" {
18- }
19-
208variable "region" {
219}
2210
2311provider "oci" {
24- region = var. region
25- tenancy_ocid = var. tenancy_ocid
26- user_ocid = var. user_ocid
27- fingerprint = var. fingerprint
28- private_key_path = var. private_key_path
12+ auth = " SecurityToken"
13+ config_file_profile = " terraform-federation-test"
2914}
3015
3116variable "time_usage_ended" {
Original file line number Diff line number Diff line change @@ -169,6 +169,14 @@ func MeteringComputationUsageResource() *schema.Resource {
169169 Type : schema .TypeString ,
170170 Computed : true ,
171171 },
172+ "attributed_cost" : {
173+ Type : schema .TypeString ,
174+ Computed : true ,
175+ },
176+ "attributed_usage" : {
177+ Type : schema .TypeString ,
178+ Computed : true ,
179+ },
172180 "compartment_id" : {
173181 Type : schema .TypeString ,
174182 Computed : true ,
@@ -522,6 +530,14 @@ func UsageSummaryToMap(obj oci_metering_computation.UsageSummary) map[string]int
522530 result ["ad" ] = string (* obj .Ad )
523531 }
524532
533+ if obj .AttributedCost != nil {
534+ result ["attributed_cost" ] = string (* obj .AttributedCost )
535+ }
536+
537+ if obj .AttributedUsage != nil {
538+ result ["attributed_usage" ] = string (* obj .AttributedUsage )
539+ }
540+
525541 if obj .CompartmentId != nil {
526542 result ["compartment_id" ] = string (* obj .CompartmentId )
527543 }
Original file line number Diff line number Diff line change @@ -80,6 +80,8 @@ The following attributes are exported:
8080* ` group_by ` - Aggregate the result by.
8181* ` items ` - A list of usage items.
8282 * `ad` - The availability domain of the usage.
83+ * `attributed_cost` - The attributed cost with a max value of 9999999999.999999999999 and a minimum value of 0.
84+ * `attributed_usage` - The attributed usage with a max value of 9999999999.999999999999 and a minimum value of 0.
8385 * `compartment_id` - The compartment OCID.
8486 * `compartment_name` - The compartment name.
8587 * `compartment_path` - The compartment path, starting from root.
You can’t perform that action at this time.
0 commit comments