# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import json
import warnings
import pulumi
import pulumi.runtime
from typing import Union
from . import utilities, tables

class GetCloudInitConfigResult:
    """
    A collection of values returned by getCloudInitConfig.
    """
    def __init__(__self__, base64_encode=None, gzip=None, parts=None, rendered=None, id=None):
        if base64_encode and not isinstance(base64_encode, bool):
            raise TypeError("Expected argument 'base64_encode' to be a bool")
        __self__.base64_encode = base64_encode
        if gzip and not isinstance(gzip, bool):
            raise TypeError("Expected argument 'gzip' to be a bool")
        __self__.gzip = gzip
        if parts and not isinstance(parts, list):
            raise TypeError("Expected argument 'parts' to be a list")
        __self__.parts = parts
        if rendered and not isinstance(rendered, str):
            raise TypeError("Expected argument 'rendered' to be a str")
        __self__.rendered = rendered
        """
        The final rendered multi-part cloudinit config.
        """
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        __self__.id = id
        """
        id is the provider-assigned unique ID for this managed resource.
        """
class AwaitableGetCloudInitConfigResult(GetCloudInitConfigResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetCloudInitConfigResult(
            base64_encode=self.base64_encode,
            gzip=self.gzip,
            parts=self.parts,
            rendered=self.rendered,
            id=self.id)

def get_cloud_init_config(base64_encode=None,gzip=None,parts=None,opts=None):
    """
    Renders a multi-part cloud-init config from source files.
    
    :param bool base64_encode: Base64 encoding of the rendered output. Default to `true`
    :param bool gzip: Specify whether or not to gzip the rendered output. Default to `true`
    :param list parts: One may specify this many times, this creates a fragment of the rendered cloud-init config file. The order of the parts is maintained in the configuration is maintained in the rendered template.
    
    The **parts** object supports the following:
    
      * `content` (`str`)
      * `contentType` (`str`)
      * `filename` (`str`)
      * `mergeType` (`str`)

    > This content is derived from https://github.com/terraform-providers/terraform-provider-template/blob/master/website/docs/d/cloudinit_config.html.markdown.
    """
    __args__ = dict()

    __args__['base64Encode'] = base64_encode
    __args__['gzip'] = gzip
    __args__['parts'] = parts
    if opts is None:
        opts = pulumi.InvokeOptions()
    if opts.version is None:
        opts.version = utilities.get_version()
    __ret__ = pulumi.runtime.invoke('terraform-template:index/getCloudInitConfig:getCloudInitConfig', __args__, opts=opts).value

    return AwaitableGetCloudInitConfigResult(
        base64_encode=__ret__.get('base64Encode'),
        gzip=__ret__.get('gzip'),
        parts=__ret__.get('parts'),
        rendered=__ret__.get('rendered'),
        id=__ret__.get('id'))
