rso_cost_estimate (Data Source)¶
What a set of identical instances would cost at the tenant's current prices.
Example Usage¶
# Check headroom and price before creating anything.
data "rso_quota" "current" {}
data "rso_cost_estimate" "small_vm" {
instance_vcpu = 1
instance_ram_gb = 2
instance_disk_gb = 60
}
output "vcpu_remaining" {
value = data.rso_quota.current.remaining["vcpu"]
}
output "small_vm_monthly" {
value = "${data.rso_cost_estimate.small_vm.monthly} ${data.rso_cost_estimate.small_vm.currency}"
}
Schema¶
Required¶
instance_disk_gb(Number) Disk per instance in GB.instance_ram_gb(Number) Memory per instance in GB.instance_vcpu(Number) vCPUs per instance.
Optional¶
instance_count(Number) Number of instances. Default1.
Read-Only¶
currency(String) Currency of the estimate.hourly(Number) Cost per hour.monthly(Number) Cost per 730-hour month.