1. Packages
  2. Cloudinit Provider
  3. API Docs
  4. Config
cloud-init v1.4.8 published on Wednesday, Oct 16, 2024 by Pulumi

cloudinit.Config

Explore with Pulumi AI

cloudinit logo
cloud-init v1.4.8 published on Wednesday, Oct 16, 2024 by Pulumi

    This resource is deprecated Please use the cloudinit.Config data source instead.

    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.

    Create Config Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Config(name: string, args?: ConfigArgs, opts?: CustomResourceOptions);
    @overload
    def Config(resource_name: str,
               args: Optional[ConfigArgs] = None,
               opts: Optional[ResourceOptions] = None)
    
    @overload
    def Config(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               base64_encode: Optional[bool] = None,
               boundary: Optional[str] = None,
               gzip: Optional[bool] = None,
               parts: Optional[Sequence[ConfigPartArgs]] = None)
    func NewConfig(ctx *Context, name string, args *ConfigArgs, opts ...ResourceOption) (*Config, error)
    public Config(string name, ConfigArgs? args = null, CustomResourceOptions? opts = null)
    public Config(String name, ConfigArgs args)
    public Config(String name, ConfigArgs args, CustomResourceOptions options)
    
    type: cloudinit:Config
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ConfigArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ConfigArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ConfigArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ConfigArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ConfigArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var configResource = new CloudInit.Config("configResource", new()
    {
        Base64Encode = false,
        Boundary = "string",
        Gzip = false,
        Parts = new[]
        {
            new CloudInit.Inputs.ConfigPartArgs
            {
                Content = "string",
                ContentType = "string",
                Filename = "string",
                MergeType = "string",
            },
        },
    });
    
    example, err := cloudinit.NewConfig(ctx, "configResource", &cloudinit.ConfigArgs{
    	Base64Encode: pulumi.Bool(false),
    	Boundary:     pulumi.String("string"),
    	Gzip:         pulumi.Bool(false),
    	Parts: cloudinit.ConfigPartArray{
    		&cloudinit.ConfigPartArgs{
    			Content:     pulumi.String("string"),
    			ContentType: pulumi.String("string"),
    			Filename:    pulumi.String("string"),
    			MergeType:   pulumi.String("string"),
    		},
    	},
    })
    
    var configResource = new Config("configResource", ConfigArgs.builder()
        .base64Encode(false)
        .boundary("string")
        .gzip(false)
        .parts(ConfigPartArgs.builder()
            .content("string")
            .contentType("string")
            .filename("string")
            .mergeType("string")
            .build())
        .build());
    
    config_resource = cloudinit.Config("configResource",
        base64_encode=False,
        boundary="string",
        gzip=False,
        parts=[{
            "content": "string",
            "content_type": "string",
            "filename": "string",
            "merge_type": "string",
        }])
    
    const configResource = new cloudinit.Config("configResource", {
        base64Encode: false,
        boundary: "string",
        gzip: false,
        parts: [{
            content: "string",
            contentType: "string",
            filename: "string",
            mergeType: "string",
        }],
    });
    
    type: cloudinit:Config
    properties:
        base64Encode: false
        boundary: string
        gzip: false
        parts:
            - content: string
              contentType: string
              filename: string
              mergeType: string
    

    Config Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Config resource accepts the following input properties:

    Base64Encode bool
    Specify whether or not to base64 encode the rendered output. Defaults to true, and cannot be disabled if gzip is true.
    Boundary string
    Specify the Writer's default boundary separator. Defaults to MIMEBOUNDARY.
    Gzip bool
    Specify whether or not to gzip the rendered output. Defaults to true.
    Parts List<Pulumi.CloudInit.Inputs.ConfigPart>
    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 to true, and cannot be disabled if gzip is true.
    Boundary string
    Specify the Writer's default boundary separator. Defaults to MIMEBOUNDARY.
    Gzip bool
    Specify whether or not to gzip the rendered output. Defaults to true.
    Parts []ConfigPartArgs
    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 to true, and cannot be disabled if gzip is true.
    boundary String
    Specify the Writer's default boundary separator. Defaults to MIMEBOUNDARY.
    gzip Boolean
    Specify whether or not to gzip the rendered output. Defaults to true.
    parts List<ConfigPart>
    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 to true, and cannot be disabled if gzip is true.
    boundary string
    Specify the Writer's default boundary separator. Defaults to MIMEBOUNDARY.
    gzip boolean
    Specify whether or not to gzip the rendered output. Defaults to true.
    parts ConfigPart[]
    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 to true, and cannot be disabled if gzip is true.
    boundary str
    Specify the Writer's default boundary separator. Defaults to MIMEBOUNDARY.
    gzip bool
    Specify whether or not to gzip the rendered output. Defaults to true.
    parts Sequence[ConfigPartArgs]
    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 to true, and cannot be disabled if gzip is true.
    boundary String
    Specify the Writer's default boundary separator. Defaults to MIMEBOUNDARY.
    gzip Boolean
    Specify whether or not to gzip the rendered output. Defaults to true.
    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.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Config resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Rendered string
    The final rendered multi-part cloud-init config.
    Id string
    The provider-assigned unique ID for this managed resource.
    Rendered string
    The final rendered multi-part cloud-init config.
    id String
    The provider-assigned unique ID for this managed resource.
    rendered String
    The final rendered multi-part cloud-init config.
    id string
    The provider-assigned unique ID for this managed resource.
    rendered string
    The final rendered multi-part cloud-init config.
    id str
    The provider-assigned unique ID for this managed resource.
    rendered str
    The final rendered multi-part cloud-init config.
    id String
    The provider-assigned unique ID for this managed resource.
    rendered String
    The final rendered multi-part cloud-init config.

    Look up Existing Config Resource

    Get an existing Config resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ConfigState, opts?: CustomResourceOptions): Config
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            base64_encode: Optional[bool] = None,
            boundary: Optional[str] = None,
            gzip: Optional[bool] = None,
            parts: Optional[Sequence[ConfigPartArgs]] = None,
            rendered: Optional[str] = None) -> Config
    func GetConfig(ctx *Context, name string, id IDInput, state *ConfigState, opts ...ResourceOption) (*Config, error)
    public static Config Get(string name, Input<string> id, ConfigState? state, CustomResourceOptions? opts = null)
    public static Config get(String name, Output<String> id, ConfigState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Base64Encode bool
    Specify whether or not to base64 encode the rendered output. Defaults to true, and cannot be disabled if gzip is true.
    Boundary string
    Specify the Writer's default boundary separator. Defaults to MIMEBOUNDARY.
    Gzip bool
    Specify whether or not to gzip the rendered output. Defaults to true.
    Parts List<Pulumi.CloudInit.Inputs.ConfigPart>
    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.
    Rendered string
    The final rendered multi-part cloud-init config.
    Base64Encode bool
    Specify whether or not to base64 encode the rendered output. Defaults to true, and cannot be disabled if gzip is true.
    Boundary string
    Specify the Writer's default boundary separator. Defaults to MIMEBOUNDARY.
    Gzip bool
    Specify whether or not to gzip the rendered output. Defaults to true.
    Parts []ConfigPartArgs
    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.
    Rendered string
    The final rendered multi-part cloud-init config.
    base64Encode Boolean
    Specify whether or not to base64 encode the rendered output. Defaults to true, and cannot be disabled if gzip is true.
    boundary String
    Specify the Writer's default boundary separator. Defaults to MIMEBOUNDARY.
    gzip Boolean
    Specify whether or not to gzip the rendered output. Defaults to true.
    parts List<ConfigPart>
    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.
    rendered String
    The final rendered multi-part cloud-init config.
    base64Encode boolean
    Specify whether or not to base64 encode the rendered output. Defaults to true, and cannot be disabled if gzip is true.
    boundary string
    Specify the Writer's default boundary separator. Defaults to MIMEBOUNDARY.
    gzip boolean
    Specify whether or not to gzip the rendered output. Defaults to true.
    parts ConfigPart[]
    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.
    rendered string
    The final rendered multi-part cloud-init config.
    base64_encode bool
    Specify whether or not to base64 encode the rendered output. Defaults to true, and cannot be disabled if gzip is true.
    boundary str
    Specify the Writer's default boundary separator. Defaults to MIMEBOUNDARY.
    gzip bool
    Specify whether or not to gzip the rendered output. Defaults to true.
    parts Sequence[ConfigPartArgs]
    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.
    rendered str
    The final rendered multi-part cloud-init config.
    base64Encode Boolean
    Specify whether or not to base64 encode the rendered output. Defaults to true, and cannot be disabled if gzip is true.
    boundary String
    Specify the Writer's default boundary separator. Defaults to MIMEBOUNDARY.
    gzip Boolean
    Specify whether or not to gzip the rendered output. Defaults to true.
    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.
    rendered String
    The final rendered multi-part cloud-init config.

    Supporting Types

    ConfigPart, ConfigPartArgs

    Content string
    Body content for the part.
    ContentType 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.
    MergeType 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.
    ContentType 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.
    MergeType 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.
    contentType 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.
    mergeType 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.
    contentType 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.
    mergeType 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.
    contentType 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.
    mergeType 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.
    cloudinit logo
    cloud-init v1.4.8 published on Wednesday, Oct 16, 2024 by Pulumi