UNPKG

@pulumi/cloudinit

Version:

A Pulumi package for creating and managing cloudinit cloud resources.

111 lines (110 loc) 5.08 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * 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 function getConfig(args?: GetConfigArgs, opts?: pulumi.InvokeOptions): Promise<GetConfigResult>; /** * A collection of arguments for invoking getConfig. */ export interface GetConfigArgs { /** * Specify whether or not to base64 encode the `rendered` output. Defaults to `true`, and cannot be disabled if gzip is `true`. */ base64Encode?: boolean; /** * Specify the Writer's default boundary separator. Defaults to `MIMEBOUNDARY`. */ boundary?: string; /** * Specify whether or not to gzip the `rendered` output. Defaults to `true`. */ gzip?: 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?: inputs.GetConfigPart[]; } /** * A collection of values returned by getConfig. */ export interface GetConfigResult { /** * Specify whether or not to base64 encode the `rendered` output. Defaults to `true`, and cannot be disabled if gzip is `true`. */ readonly base64Encode: boolean; /** * Specify the Writer's default boundary separator. Defaults to `MIMEBOUNDARY`. */ readonly boundary: string; /** * Specify whether or not to gzip the `rendered` output. Defaults to `true`. */ readonly gzip: boolean; /** * [CRC-32](https://pkg.go.dev/hash/crc32) checksum of `rendered` cloud-init config. */ readonly id: string; /** * 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?: outputs.GetConfigPart[]; /** * The final rendered multi-part cloud-init config. */ readonly rendered: string; } /** * 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 function getConfigOutput(args?: GetConfigOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetConfigResult>; /** * A collection of arguments for invoking getConfig. */ export interface GetConfigOutputArgs { /** * 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.GetConfigPartArgs>[]>; }