cloudinit.getConfig
Explore with Pulumi AI
Renders a multi-part MIME configuration for use with cloud-init.
Cloud-init is a commonly-used startup configuration utility for cloud compute instances. It accepts configuration via provider-specific user data mechanisms, such as user_data
for Amazon EC2 instances. Multi-part MIME is one of the data formats it accepts. For more information, see User-Data Formats in the cloud-init manual.
This is not a generalized utility for producing multi-part MIME messages. It’s feature set is specialized for cloud-init multi-part MIME messages.
Using getConfig
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 getConfig(args: GetConfigArgs, opts?: InvokeOptions): Promise<GetConfigResult>
function getConfigOutput(args: GetConfigOutputArgs, opts?: InvokeOptions): Output<GetConfigResult>
def get_config(base64_encode: Optional[bool] = None,
boundary: Optional[str] = None,
gzip: Optional[bool] = None,
parts: Optional[Sequence[GetConfigPart]] = None,
opts: Optional[InvokeOptions] = None) -> GetConfigResult
def get_config_output(base64_encode: Optional[pulumi.Input[bool]] = None,
boundary: Optional[pulumi.Input[str]] = None,
gzip: Optional[pulumi.Input[bool]] = None,
parts: Optional[pulumi.Input[Sequence[pulumi.Input[GetConfigPartArgs]]]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetConfigResult]
func LookupConfig(ctx *Context, args *LookupConfigArgs, opts ...InvokeOption) (*LookupConfigResult, error)
func LookupConfigOutput(ctx *Context, args *LookupConfigOutputArgs, opts ...InvokeOption) LookupConfigResultOutput
> Note: This function is named LookupConfig
in the Go SDK.
public static class GetConfig
{
public static Task<GetConfigResult> InvokeAsync(GetConfigArgs args, InvokeOptions? opts = null)
public static Output<GetConfigResult> Invoke(GetConfigInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetConfigResult> getConfig(GetConfigArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: cloudinit:index/getConfig:getConfig
arguments:
# arguments dictionary
The following arguments are supported:
- Base64Encode bool
- Specify whether or not to base64 encode the
rendered
output. Defaults totrue
, and cannot be disabled if gzip istrue
. - Boundary string
- Specify the Writer's default boundary separator. Defaults to
MIMEBOUNDARY
. - Gzip bool
- Specify whether or not to gzip the
rendered
output. Defaults totrue
. - Parts
List<Pulumi.
Cloud Init. Inputs. Get Config Part> - 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.
- Base64Encode bool
- Specify whether or not to base64 encode the
rendered
output. Defaults totrue
, and cannot be disabled if gzip istrue
. - Boundary string
- Specify the Writer's default boundary separator. Defaults to
MIMEBOUNDARY
. - Gzip bool
- Specify whether or not to gzip the
rendered
output. Defaults totrue
. - Parts
[]Get
Config Part - 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.
- base64Encode Boolean
- Specify whether or not to base64 encode the
rendered
output. Defaults totrue
, and cannot be disabled if gzip istrue
. - boundary String
- Specify the Writer's default boundary separator. Defaults to
MIMEBOUNDARY
. - gzip Boolean
- Specify whether or not to gzip the
rendered
output. Defaults totrue
. - parts
List<Get
Config Part> - 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.
- base64Encode boolean
- Specify whether or not to base64 encode the
rendered
output. Defaults totrue
, and cannot be disabled if gzip istrue
. - boundary string
- Specify the Writer's default boundary separator. Defaults to
MIMEBOUNDARY
. - gzip boolean
- Specify whether or not to gzip the
rendered
output. Defaults totrue
. - parts
Get
Config Part[] - 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.
- base64_
encode bool - Specify whether or not to base64 encode the
rendered
output. Defaults totrue
, and cannot be disabled if gzip istrue
. - boundary str
- Specify the Writer's default boundary separator. Defaults to
MIMEBOUNDARY
. - gzip bool
- Specify whether or not to gzip the
rendered
output. Defaults totrue
. - parts
Sequence[Get
Config Part] - 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.
- base64Encode Boolean
- Specify whether or not to base64 encode the
rendered
output. Defaults totrue
, and cannot be disabled if gzip istrue
. - boundary String
- Specify the Writer's default boundary separator. Defaults to
MIMEBOUNDARY
. - gzip Boolean
- Specify whether or not to gzip the
rendered
output. Defaults totrue
. - parts List<Property Map>
- 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.
getConfig Result
The following output properties are available:
- Base64Encode bool
- Specify whether or not to base64 encode the
rendered
output. Defaults totrue
, and cannot be disabled if gzip istrue
. - Boundary string
- Specify the Writer's default boundary separator. Defaults to
MIMEBOUNDARY
. - Gzip bool
- Specify whether or not to gzip the
rendered
output. Defaults totrue
. - Id string
- CRC-32 checksum of
rendered
cloud-init config. - Rendered string
- The final rendered multi-part cloud-init config.
- Parts
List<Pulumi.
Cloud Init. Outputs. Get Config Part> - 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.
- Base64Encode bool
- Specify whether or not to base64 encode the
rendered
output. Defaults totrue
, and cannot be disabled if gzip istrue
. - Boundary string
- Specify the Writer's default boundary separator. Defaults to
MIMEBOUNDARY
. - Gzip bool
- Specify whether or not to gzip the
rendered
output. Defaults totrue
. - Id string
- CRC-32 checksum of
rendered
cloud-init config. - Rendered string
- The final rendered multi-part cloud-init config.
- Parts
[]Get
Config Part - 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.
- base64Encode Boolean
- Specify whether or not to base64 encode the
rendered
output. Defaults totrue
, and cannot be disabled if gzip istrue
. - boundary String
- Specify the Writer's default boundary separator. Defaults to
MIMEBOUNDARY
. - gzip Boolean
- Specify whether or not to gzip the
rendered
output. Defaults totrue
. - id String
- CRC-32 checksum of
rendered
cloud-init config. - rendered String
- The final rendered multi-part cloud-init config.
- parts
List<Get
Config Part> - 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.
- base64Encode boolean
- Specify whether or not to base64 encode the
rendered
output. Defaults totrue
, and cannot be disabled if gzip istrue
. - boundary string
- Specify the Writer's default boundary separator. Defaults to
MIMEBOUNDARY
. - gzip boolean
- Specify whether or not to gzip the
rendered
output. Defaults totrue
. - id string
- CRC-32 checksum of
rendered
cloud-init config. - rendered string
- The final rendered multi-part cloud-init config.
- parts
Get
Config Part[] - 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.
- base64_
encode bool - Specify whether or not to base64 encode the
rendered
output. Defaults totrue
, and cannot be disabled if gzip istrue
. - boundary str
- Specify the Writer's default boundary separator. Defaults to
MIMEBOUNDARY
. - gzip bool
- Specify whether or not to gzip the
rendered
output. Defaults totrue
. - id str
- CRC-32 checksum of
rendered
cloud-init config. - rendered str
- The final rendered multi-part cloud-init config.
- parts
Sequence[Get
Config Part] - 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.
- base64Encode Boolean
- Specify whether or not to base64 encode the
rendered
output. Defaults totrue
, and cannot be disabled if gzip istrue
. - boundary String
- Specify the Writer's default boundary separator. Defaults to
MIMEBOUNDARY
. - gzip Boolean
- Specify whether or not to gzip the
rendered
output. Defaults totrue
. - id String
- CRC-32 checksum of
rendered
cloud-init config. - rendered String
- The final rendered multi-part cloud-init config.
- parts List<Property Map>
- 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.
Supporting Types
GetConfigPart
- Content string
- Body content for the part.
- Content
Type string - A MIME-style content type to report in the header for the part. Defaults to
text/plain
- Filename string
- A filename to report in the header for the part.
- Merge
Type string - A value for the
X-Merge-Type
header of the part, to control cloud-init merging behavior.
- Content string
- Body content for the part.
- Content
Type string - A MIME-style content type to report in the header for the part. Defaults to
text/plain
- Filename string
- A filename to report in the header for the part.
- Merge
Type string - A value for the
X-Merge-Type
header of the part, to control cloud-init merging behavior.
- content String
- Body content for the part.
- content
Type String - A MIME-style content type to report in the header for the part. Defaults to
text/plain
- filename String
- A filename to report in the header for the part.
- merge
Type String - A value for the
X-Merge-Type
header of the part, to control cloud-init merging behavior.
- content string
- Body content for the part.
- content
Type string - A MIME-style content type to report in the header for the part. Defaults to
text/plain
- filename string
- A filename to report in the header for the part.
- merge
Type string - A value for the
X-Merge-Type
header of the part, to control cloud-init merging behavior.
- content str
- Body content for the part.
- content_
type str - A MIME-style content type to report in the header for the part. Defaults to
text/plain
- filename str
- A filename to report in the header for the part.
- merge_
type str - A value for the
X-Merge-Type
header of the part, to control cloud-init merging behavior.
- content String
- Body content for the part.
- content
Type String - A MIME-style content type to report in the header for the part. Defaults to
text/plain
- filename String
- A filename to report in the header for the part.
- merge
Type String - A value for the
X-Merge-Type
header of the part, to control cloud-init merging behavior.
Package Details
- Repository
- cloud-init pulumi/pulumi-cloudinit
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
cloudinit
Terraform Provider.