GetOperatingSystem
Use this data source to get Packet Operating System image.
Example Usage
using Pulumi;
using Packet = Pulumi.Packet;
class MyStack : Stack
{
public MyStack()
{
var example = Output.Create(Packet.GetOperatingSystem.InvokeAsync(new Packet.GetOperatingSystemArgs
{
Name = "Container Linux",
Distro = "coreos",
Version = "alpha",
ProvisionableOn = "c1.small.x86",
}));
var server = new Packet.Device("server", new Packet.DeviceArgs
{
Hostname = "tf.coreos2",
Plan = "c1.small.x86",
Facilities =
{
"ewr1",
},
OperatingSystem = example.Apply(example => example.Id),
BillingCycle = "hourly",
ProjectId = local.Project_id,
});
}
}
Coming soon!
import pulumi
import pulumi_packet as packet
example = packet.get_operating_system(name="Container Linux",
distro="coreos",
version="alpha",
provisionable_on="c1.small.x86")
server = packet.Device("server",
hostname="tf.coreos2",
plan="c1.small.x86",
facilities=["ewr1"],
operating_system=example.id,
billing_cycle="hourly",
project_id=local["project_id"])import * as pulumi from "@pulumi/pulumi";
import * as packet from "@pulumi/packet";
const example = packet.getOperatingSystem({
name: "Container Linux",
distro: "coreos",
version: "alpha",
provisionableOn: "c1.small.x86",
});
const server = new packet.Device("server", {
hostname: "tf.coreos2",
plan: "c1.small.x86",
facilities: ["ewr1"],
operatingSystem: example.then(example => example.id),
billingCycle: "hourly",
projectId: local.project_id,
});Using GetOperatingSystem
function getOperatingSystem(args: GetOperatingSystemArgs, opts?: InvokeOptions): Promise<GetOperatingSystemResult>function get_operating_system(distro=None, name=None, provisionable_on=None, version=None, opts=None)func GetOperatingSystem(ctx *Context, args *GetOperatingSystemArgs, opts ...InvokeOption) (*GetOperatingSystemResult, error)public static class GetOperatingSystem {
public static Task<GetOperatingSystemResult> InvokeAsync(GetOperatingSystemArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
GetOperatingSystem Result
The following output properties are available:
Package Details
- Repository
- https://github.com/pulumi/pulumi-packet
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
packetTerraform Provider.