UNPKG

@pulumi/cloudinit

Version:

A Pulumi package for creating and managing cloudinit cloud resources.

115 lines (114 loc) 5.24 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * > **This resource is deprecated** Please use the cloudinit.Config * data source instead. * * Renders a [multi-part MIME configuration](https://cloudinit.readthedocs.io/en/latest/explanation/format.html#mime-multi-part-archive) for use with [cloud-init](https://cloudinit.readthedocs.io/en/latest/). * * Cloud-init is a commonly-used startup configuration utility for cloud compute instances. It accepts configuration via provider-specific user data mechanisms, such as `userData` for Amazon EC2 instances. Multi-part MIME is one of the data formats it accepts. For more information, see [User-Data Formats](https://cloudinit.readthedocs.io/en/latest/explanation/format.html) in the cloud-init manual. * * This is not a generalized utility for producing multi-part MIME messages. Its feature set is specialized for cloud-init multi-part MIME messages. * * ## Example Usage * * ### Config * * ### hello-script.sh * * ### cloud-config.yaml * * <!-- This schema was originally generated with tfplugindocs, then modified manually to ensure `part` block list is noted as Required --> */ export declare class Config extends pulumi.CustomResource { /** * Get an existing Config resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ConfigState, opts?: pulumi.CustomResourceOptions): Config; /** * Returns true if the given object is an instance of Config. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Config; /** * Specify whether or not to base64 encode the `rendered` output. Defaults to `true`, and cannot be disabled if gzip is `true`. */ readonly base64Encode: pulumi.Output<boolean>; /** * Specify the Writer's default boundary separator. Defaults to `MIMEBOUNDARY`. */ readonly boundary: pulumi.Output<string>; /** * Specify whether or not to gzip the `rendered` output. Defaults to `true`. */ readonly gzip: pulumi.Output<boolean>; /** * A nested block type which adds a file to the generated cloud-init configuration. Use multiple `part` blocks to specify multiple files, which will be included in order of declaration in the final MIME document. */ readonly parts: pulumi.Output<outputs.ConfigPart[] | undefined>; /** * The final rendered multi-part cloud-init config. */ readonly rendered: pulumi.Output<string>; /** * Create a Config resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args?: ConfigArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Config resources. */ export interface ConfigState { /** * Specify whether or not to base64 encode the `rendered` output. Defaults to `true`, and cannot be disabled if gzip is `true`. */ base64Encode?: pulumi.Input<boolean>; /** * Specify the Writer's default boundary separator. Defaults to `MIMEBOUNDARY`. */ boundary?: pulumi.Input<string>; /** * Specify whether or not to gzip the `rendered` output. Defaults to `true`. */ gzip?: pulumi.Input<boolean>; /** * A nested block type which adds a file to the generated cloud-init configuration. Use multiple `part` blocks to specify multiple files, which will be included in order of declaration in the final MIME document. */ parts?: pulumi.Input<pulumi.Input<inputs.ConfigPart>[]>; /** * The final rendered multi-part cloud-init config. */ rendered?: pulumi.Input<string>; } /** * The set of arguments for constructing a Config resource. */ export interface ConfigArgs { /** * Specify whether or not to base64 encode the `rendered` output. Defaults to `true`, and cannot be disabled if gzip is `true`. */ base64Encode?: pulumi.Input<boolean>; /** * Specify the Writer's default boundary separator. Defaults to `MIMEBOUNDARY`. */ boundary?: pulumi.Input<string>; /** * Specify whether or not to gzip the `rendered` output. Defaults to `true`. */ gzip?: pulumi.Input<boolean>; /** * A nested block type which adds a file to the generated cloud-init configuration. Use multiple `part` blocks to specify multiple files, which will be included in order of declaration in the final MIME document. */ parts?: pulumi.Input<pulumi.Input<inputs.ConfigPart>[]>; }