We recommend using Azure Native.
Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
We recommend using Azure Native.
Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
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/v4/go/azure/compute"
"github.com/pulumi/pulumi/sdk/v3/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
})
}
Example coming soon!
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);
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)
Example coming soon!
Using getPlatformImage
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getPlatformImage(args: GetPlatformImageArgs, opts?: InvokeOptions): Promise<GetPlatformImageResult>
function getPlatformImageOutput(args: GetPlatformImageOutputArgs, opts?: InvokeOptions): Output<GetPlatformImageResult>def get_platform_image(location: Optional[str] = None,
offer: Optional[str] = None,
publisher: Optional[str] = None,
sku: Optional[str] = None,
version: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetPlatformImageResult
def get_platform_image_output(location: Optional[pulumi.Input[str]] = None,
offer: Optional[pulumi.Input[str]] = None,
publisher: Optional[pulumi.Input[str]] = None,
sku: Optional[pulumi.Input[str]] = None,
version: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetPlatformImageResult]func GetPlatformImage(ctx *Context, args *GetPlatformImageArgs, opts ...InvokeOption) (*GetPlatformImageResult, error)
func GetPlatformImageOutput(ctx *Context, args *GetPlatformImageOutputArgs, opts ...InvokeOption) GetPlatformImageResultOutput> Note: This function is named GetPlatformImage in the Go SDK.
public static class GetPlatformImage
{
public static Task<GetPlatformImageResult> InvokeAsync(GetPlatformImageArgs args, InvokeOptions? opts = null)
public static Output<GetPlatformImageResult> Invoke(GetPlatformImageInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetPlatformImageResult> getPlatformImage(GetPlatformImageArgs args, InvokeOptions options)
public static Output<GetPlatformImageResult> getPlatformImage(GetPlatformImageArgs args, InvokeOptions options)
fn::invoke:
function: azure:compute/getPlatformImage:getPlatformImage
arguments:
# arguments dictionaryThe 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 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.
- 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.
getPlatformImage Result
The following output properties are available:
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.
We recommend using Azure Native.
Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
