cloudinit.Config
Explore with Pulumi AI
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=[cloudinit.ConfigPartArgs(
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
The Config resource accepts the following input properties:
- 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. 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
[]Config
Part Args - 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<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
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[Config
Part Args] - 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.
Outputs
All input properties are implicitly available as output properties. Additionally, the Config resource produces the following output properties:
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.
- 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. 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. - Rendered string
- The final rendered multi-part cloud-init config.
- 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
[]Config
Part Args - 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 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<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. - rendered String
- The final rendered multi-part cloud-init config.
- 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
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. - rendered string
- The final rendered multi-part cloud-init config.
- 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[Config
Part Args] - 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 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. - rendered String
- The final rendered multi-part cloud-init config.
Supporting Types
ConfigPart, ConfigPartArgs
- 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.