GetPlatformImage

Use this data source to access information about a Platform Image.

Example Usage

using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(Azure.Compute.GetPlatformImage.InvokeAsync(new Azure.Compute.GetPlatformImageArgs
        {
            Location = "West Europe",
            Publisher = "Canonical",
            Offer = "UbuntuServer",
            Sku = "16.04-LTS",
        }));
        this.Id = example.Apply(example => example.Id);
    }

    [Output("id")]
    public Output<string> Id { get; set; }
}
package main

import (
    "github.com/pulumi/pulumi-azure/sdk/v3/go/azure/compute"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        example, err := compute.GetPlatformImage(ctx, &compute.GetPlatformImageArgs{
            Location:  "West Europe",
            Publisher: "Canonical",
            Offer:     "UbuntuServer",
            Sku:       "16.04-LTS",
        }, nil)
        if err != nil {
            return err
        }
        ctx.Export("id", example.Id)
        return nil
    })
}
import pulumi
import pulumi_azure as azure

example = azure.compute.get_platform_image(location="West Europe",
    publisher="Canonical",
    offer="UbuntuServer",
    sku="16.04-LTS")
pulumi.export("id", example.id)
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = azure.compute.getPlatformImage({
    location: "West Europe",
    publisher: "Canonical",
    offer: "UbuntuServer",
    sku: "16.04-LTS",
});
export const id = example.then(example => example.id);

Using GetPlatformImage

function getPlatformImage(args: GetPlatformImageArgs, opts?: InvokeOptions): Promise<GetPlatformImageResult>
function  get_platform_image(location=None, offer=None, publisher=None, sku=None, version=None, opts=None)
func GetPlatformImage(ctx *Context, args *GetPlatformImageArgs, opts ...InvokeOption) (*GetPlatformImageResult, error)
public static class GetPlatformImage {
    public static Task<GetPlatformImageResult> InvokeAsync(GetPlatformImageArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Location string

Specifies the Location to pull information about this Platform Image from.

Offer string

Specifies the Offer associated with the Platform Image.

Publisher string

Specifies the Publisher associated with the Platform Image.

Sku string

Specifies the SKU of the Platform Image.

Version string

The version of the Platform Image.

Location string

Specifies the Location to pull information about this Platform Image from.

Offer string

Specifies the Offer associated with the Platform Image.

Publisher string

Specifies the Publisher associated with the Platform Image.

Sku string

Specifies the SKU of the Platform Image.

Version string

The version of the Platform Image.

location string

Specifies the Location to pull information about this Platform Image from.

offer string

Specifies the Offer associated with the Platform Image.

publisher string

Specifies the Publisher associated with the Platform Image.

sku string

Specifies the SKU of the Platform Image.

version string

The version of the Platform Image.

location str

Specifies the Location to pull information about this Platform Image from.

offer str

Specifies the Offer associated with the Platform Image.

publisher str

Specifies the Publisher associated with the Platform Image.

sku str

Specifies the SKU of the Platform Image.

version str

The version of the Platform Image.

GetPlatformImage Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

Location string
Offer string
Publisher string
Sku string
Version string
Id string

The provider-assigned unique ID for this managed resource.

Location string
Offer string
Publisher string
Sku string
Version string
id string

The provider-assigned unique ID for this managed resource.

location string
offer string
publisher string
sku string
version string
id str

The provider-assigned unique ID for this managed resource.

location str
offer str
publisher str
sku str
version str

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.