@equinix-labs/pulumi-equinix
Version:
A Pulumi package for creating and managing equinix cloud resources.
111 lines (110 loc) • 3.19 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Use this data source to get Equinix Metal Operating System image.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as equinix from "@equinix-labs/pulumi-equinix";
*
* 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: equinix.metal.Plan.C3MediumX86,
* metro: "ny",
* operatingSystem: example.then(example => example.id).apply((x) => equinix.metal.OperatingSystem[x]),
* billingCycle: equinix.metal.BillingCycle.Hourly,
* projectId: local.project_id,
* });
* ```
*/
export declare function getOperatingSystem(args?: GetOperatingSystemArgs, opts?: pulumi.InvokeOptions): Promise<GetOperatingSystemResult>;
/**
* A collection of arguments for invoking getOperatingSystem.
*/
export interface GetOperatingSystemArgs {
/**
* Name of the OS distribution.
*/
distro?: string;
/**
* Name or part of the name of the distribution. Case insensitive.
*/
name?: string;
/**
* Plan name.
*/
provisionableOn?: string;
/**
* Version of the distribution.
*/
version?: string;
}
/**
* A collection of values returned by getOperatingSystem.
*/
export interface GetOperatingSystemResult {
readonly distro?: string;
/**
* The provider-assigned unique ID for this managed resource.
*/
readonly id: string;
readonly name?: string;
readonly provisionableOn?: string;
/**
* Operating system slug (same as `id`).
*/
readonly slug: string;
readonly version?: string;
}
/**
* Use this data source to get Equinix Metal Operating System image.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as equinix from "@equinix-labs/pulumi-equinix";
*
* 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: equinix.metal.Plan.C3MediumX86,
* metro: "ny",
* operatingSystem: example.then(example => example.id).apply((x) => equinix.metal.OperatingSystem[x]),
* billingCycle: equinix.metal.BillingCycle.Hourly,
* projectId: local.project_id,
* });
* ```
*/
export declare function getOperatingSystemOutput(args?: GetOperatingSystemOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetOperatingSystemResult>;
/**
* A collection of arguments for invoking getOperatingSystem.
*/
export interface GetOperatingSystemOutputArgs {
/**
* Name of the OS distribution.
*/
distro?: pulumi.Input<string>;
/**
* Name or part of the name of the distribution. Case insensitive.
*/
name?: pulumi.Input<string>;
/**
* Plan name.
*/
provisionableOn?: pulumi.Input<string>;
/**
* Version of the distribution.
*/
version?: pulumi.Input<string>;
}