Module pricing

This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the pulumi/pulumi-aws repo; however, if that doesn’t turn up anything, please consult the source terraform-providers/terraform-provider-aws repo.

Data Sources

Others

Data Sources

Data Source getProduct

getProduct(args: GetProductArgs, opts?: pulumi.InvokeOptions): Promise<GetProductResult> & GetProductResult

Use this data source to get the pricing information of all products in AWS. This data source is only available in a us-east-1 or ap-south-1 provider.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = aws.pricing.getProduct({
    filters: [
        {
            field: "instanceType",
            value: "c5.xlarge",
        },
        {
            field: "operatingSystem",
            value: "Linux",
        },
        {
            field: "location",
            value: "US East (N. Virginia)",
        },
        {
            field: "preInstalledSw",
            value: "NA",
        },
        {
            field: "licenseModel",
            value: "No License required",
        },
        {
            field: "tenancy",
            value: "Shared",
        },
    ],
    serviceCode: "AmazonEC2",
});
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = aws.pricing.getProduct({
    filters: [
        {
            field: "instanceType",
            value: "ds1.xlarge",
        },
        {
            field: "location",
            value: "US East (N. Virginia)",
        },
    ],
    serviceCode: "AmazonRedshift",
});

This content is derived from https://github.com/terraform-providers/terraform-provider-aws/blob/master/website/docs/d/pricing_product.html.markdown.

Others

interface GetProductArgs

interface GetProductArgs

A collection of arguments for invoking getProduct.

property filters

filters: inputs.pricing.GetProductFilter[];

A list of filters. Passed directly to the API (see GetProducts API reference). These filters must describe a single product, this resource will fail if more than one product is returned by the API.

property serviceCode

serviceCode: string;

The code of the service. Available service codes can be fetched using the DescribeServices pricing API call.

interface GetProductResult

interface GetProductResult

A collection of values returned by getProduct.

property filters

filters: outputs.pricing.GetProductFilter[];

property id

id: string;

id is the provider-assigned unique ID for this managed resource.

property result

result: string;

Set to the product returned from the API.

property serviceCode

serviceCode: string;