Equinix Metal v3.2.1, Dec 30 21
Equinix Metal v3.2.1, Dec 30 21
equinix-metal.getOperatingSystem
Explore with Pulumi AI
Use this data source to get Equinix Metal Operating System image.
Example Usage
using Pulumi;
using EquinixMetal = Pulumi.EquinixMetal;
class MyStack : Stack
{
public MyStack()
{
var example = Output.Create(EquinixMetal.GetOperatingSystem.InvokeAsync(new EquinixMetal.GetOperatingSystemArgs
{
Distro = "ubuntu",
Version = "20.04",
ProvisionableOn = "c3.medium.x86",
}));
var server = new EquinixMetal.Device("server", new EquinixMetal.DeviceArgs
{
Hostname = "tf.ubuntu",
Plan = "c3.medium.x86",
Facilities =
{
"ny5",
},
OperatingSystem = example.Apply(example => example.Id),
BillingCycle = "hourly",
ProjectId = local.Project_id,
});
}
}
package main
import (
"github.com/pulumi/pulumi-equinix-metal/sdk/v3/go/equinix-metal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
opt0 := "ubuntu"
opt1 := "20.04"
opt2 := "c3.medium.x86"
example, err := equinix - metal.GetOperatingSystem(ctx, &GetOperatingSystemArgs{
Distro: &opt0,
Version: &opt1,
ProvisionableOn: &opt2,
}, nil)
if err != nil {
return err
}
_, err = equinix - metal.NewDevice(ctx, "server", &equinix-metal.DeviceArgs{
Hostname: pulumi.String("tf.ubuntu"),
Plan: pulumi.String("c3.medium.x86"),
Facilities: pulumi.StringArray{
pulumi.String("ny5"),
},
OperatingSystem: pulumi.String(example.Id),
BillingCycle: pulumi.String("hourly"),
ProjectId: pulumi.Any(local.Project_id),
})
if err != nil {
return err
}
return nil
})
}
Coming soon!
import pulumi
import pulumi_equinix_metal as equinix_metal
example = equinix_metal.get_operating_system(distro="ubuntu",
version="20.04",
provisionable_on="c3.medium.x86")
server = equinix_metal.Device("server",
hostname="tf.ubuntu",
plan="c3.medium.x86",
facilities=["ny5"],
operating_system=example.id,
billing_cycle="hourly",
project_id=local["project_id"])
import * as pulumi from "@pulumi/pulumi";
import * as equinix_metal from "@pulumi/equinix-metal";
const example = equinix_metal.getOperatingSystem({
distro: "ubuntu",
version: "20.04",
provisionableOn: "c3.medium.x86",
});
const server = new equinix_metal.Device("server", {
hostname: "tf.ubuntu",
plan: "c3.medium.x86",
facilities: ["ny5"],
operatingSystem: example.then(example => example.id),
billingCycle: "hourly",
projectId: local.project_id,
});
Coming soon!
Using getOperatingSystem
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 getOperatingSystem(args: GetOperatingSystemArgs, opts?: InvokeOptions): Promise<GetOperatingSystemResult>
function getOperatingSystemOutput(args: GetOperatingSystemOutputArgs, opts?: InvokeOptions): Output<GetOperatingSystemResult>
def get_operating_system(distro: Optional[str] = None,
name: Optional[str] = None,
provisionable_on: Optional[str] = None,
version: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetOperatingSystemResult
def get_operating_system_output(distro: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
provisionable_on: Optional[pulumi.Input[str]] = None,
version: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetOperatingSystemResult]
func GetOperatingSystem(ctx *Context, args *GetOperatingSystemArgs, opts ...InvokeOption) (*GetOperatingSystemResult, error)
func GetOperatingSystemOutput(ctx *Context, args *GetOperatingSystemOutputArgs, opts ...InvokeOption) GetOperatingSystemResultOutput
> Note: This function is named GetOperatingSystem
in the Go SDK.
public static class GetOperatingSystem
{
public static Task<GetOperatingSystemResult> InvokeAsync(GetOperatingSystemArgs args, InvokeOptions? opts = null)
public static Output<GetOperatingSystemResult> Invoke(GetOperatingSystemInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetOperatingSystemResult> getOperatingSystem(GetOperatingSystemArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: equinix-metal:index/getOperatingSystem:getOperatingSystem
arguments:
# arguments dictionary
The following arguments are supported:
- Distro string
Name of the OS distribution.
- Name string
Name or part of the name of the distribution. Case insensitive.
- Provisionable
On string Plan name.
- Version string
Version of the distribution
- Distro string
Name of the OS distribution.
- Name string
Name or part of the name of the distribution. Case insensitive.
- Provisionable
On string Plan name.
- Version string
Version of the distribution
- distro String
Name of the OS distribution.
- name String
Name or part of the name of the distribution. Case insensitive.
- provisionable
On String Plan name.
- version String
Version of the distribution
- distro string
Name of the OS distribution.
- name string
Name or part of the name of the distribution. Case insensitive.
- provisionable
On string Plan name.
- version string
Version of the distribution
- distro str
Name of the OS distribution.
- name str
Name or part of the name of the distribution. Case insensitive.
- provisionable_
on str Plan name.
- version str
Version of the distribution
- distro String
Name of the OS distribution.
- name String
Name or part of the name of the distribution. Case insensitive.
- provisionable
On String Plan name.
- version String
Version of the distribution
getOperatingSystem Result
The following output properties are available:
Package Details
- Repository
- Equinix Metal pulumi/pulumi-equinix-metal
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
metal
Terraform Provider.