ImageRecipeArgs

data class ImageRecipeArgs(val blockDeviceMappings: Output<List<ImageRecipeBlockDeviceMappingArgs>>? = null, val components: Output<List<ImageRecipeComponentArgs>>? = null, val description: Output<String>? = null, val name: Output<String>? = null, val parentImage: Output<String>? = null, val systemsManagerAgent: Output<ImageRecipeSystemsManagerAgentArgs>? = null, val tags: Output<Map<String, String>>? = null, val userDataBase64: Output<String>? = null, val version: Output<String>? = null, val workingDirectory: Output<String>? = null) : ConvertibleToJava<ImageRecipeArgs>

Manages an Image Builder Image Recipe.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.imagebuilder.ImageRecipe("example", {
blockDeviceMappings: [{
deviceName: "/dev/xvdb",
ebs: {
deleteOnTermination: "true",
volumeSize: 100,
volumeType: "gp2",
},
}],
components: [{
componentArn: exampleAwsImagebuilderComponent.arn,
parameters: [
{
name: "Parameter1",
value: "Value1",
},
{
name: "Parameter2",
value: "Value2",
},
],
}],
name: "example",
parentImage: `arn:${current.partition}:imagebuilder:${currentAwsRegion.name}:aws:image/amazon-linux-2-x86/x.x.x`,
version: "1.0.0",
});
import pulumi
import pulumi_aws as aws
example = aws.imagebuilder.ImageRecipe("example",
block_device_mappings=[{
"device_name": "/dev/xvdb",
"ebs": {
"delete_on_termination": "true",
"volume_size": 100,
"volume_type": "gp2",
},
}],
components=[{
"component_arn": example_aws_imagebuilder_component["arn"],
"parameters": [
{
"name": "Parameter1",
"value": "Value1",
},
{
"name": "Parameter2",
"value": "Value2",
},
],
}],
name="example",
parent_image=f"arn:{current['partition']}:imagebuilder:{current_aws_region['name']}:aws:image/amazon-linux-2-x86/x.x.x",
version="1.0.0")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.ImageBuilder.ImageRecipe("example", new()
{
BlockDeviceMappings = new[]
{
new Aws.ImageBuilder.Inputs.ImageRecipeBlockDeviceMappingArgs
{
DeviceName = "/dev/xvdb",
Ebs = new Aws.ImageBuilder.Inputs.ImageRecipeBlockDeviceMappingEbsArgs
{
DeleteOnTermination = "true",
VolumeSize = 100,
VolumeType = "gp2",
},
},
},
Components = new[]
{
new Aws.ImageBuilder.Inputs.ImageRecipeComponentArgs
{
ComponentArn = exampleAwsImagebuilderComponent.Arn,
Parameters = new[]
{
new Aws.ImageBuilder.Inputs.ImageRecipeComponentParameterArgs
{
Name = "Parameter1",
Value = "Value1",
},
new Aws.ImageBuilder.Inputs.ImageRecipeComponentParameterArgs
{
Name = "Parameter2",
Value = "Value2",
},
},
},
},
Name = "example",
ParentImage = $"arn:{current.Partition}:imagebuilder:{currentAwsRegion.Name}:aws:image/amazon-linux-2-x86/x.x.x",
Version = "1.0.0",
});
});
package main
import (
"fmt"
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/imagebuilder"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := imagebuilder.NewImageRecipe(ctx, "example", &imagebuilder.ImageRecipeArgs{
BlockDeviceMappings: imagebuilder.ImageRecipeBlockDeviceMappingArray{
&imagebuilder.ImageRecipeBlockDeviceMappingArgs{
DeviceName: pulumi.String("/dev/xvdb"),
Ebs: &imagebuilder.ImageRecipeBlockDeviceMappingEbsArgs{
DeleteOnTermination: pulumi.String("true"),
VolumeSize: pulumi.Int(100),
VolumeType: pulumi.String("gp2"),
},
},
},
Components: imagebuilder.ImageRecipeComponentArray{
&imagebuilder.ImageRecipeComponentArgs{
ComponentArn: pulumi.Any(exampleAwsImagebuilderComponent.Arn),
Parameters: imagebuilder.ImageRecipeComponentParameterArray{
&imagebuilder.ImageRecipeComponentParameterArgs{
Name: pulumi.String("Parameter1"),
Value: pulumi.String("Value1"),
},
&imagebuilder.ImageRecipeComponentParameterArgs{
Name: pulumi.String("Parameter2"),
Value: pulumi.String("Value2"),
},
},
},
},
Name: pulumi.String("example"),
ParentImage: pulumi.Sprintf("arn:%v:imagebuilder:%v:aws:image/amazon-linux-2-x86/x.x.x", current.Partition, currentAwsRegion.Name),
Version: pulumi.String("1.0.0"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.imagebuilder.ImageRecipe;
import com.pulumi.aws.imagebuilder.ImageRecipeArgs;
import com.pulumi.aws.imagebuilder.inputs.ImageRecipeBlockDeviceMappingArgs;
import com.pulumi.aws.imagebuilder.inputs.ImageRecipeBlockDeviceMappingEbsArgs;
import com.pulumi.aws.imagebuilder.inputs.ImageRecipeComponentArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new ImageRecipe("example", ImageRecipeArgs.builder()
.blockDeviceMappings(ImageRecipeBlockDeviceMappingArgs.builder()
.deviceName("/dev/xvdb")
.ebs(ImageRecipeBlockDeviceMappingEbsArgs.builder()
.deleteOnTermination("true")
.volumeSize(100)
.volumeType("gp2")
.build())
.build())
.components(ImageRecipeComponentArgs.builder()
.componentArn(exampleAwsImagebuilderComponent.arn())
.parameters(
ImageRecipeComponentParameterArgs.builder()
.name("Parameter1")
.value("Value1")
.build(),
ImageRecipeComponentParameterArgs.builder()
.name("Parameter2")
.value("Value2")
.build())
.build())
.name("example")
.parentImage(String.format("arn:%s:imagebuilder:%s:aws:image/amazon-linux-2-x86/x.x.x", current.partition(),currentAwsRegion.name()))
.version("1.0.0")
.build());
}
}
resources:
example:
type: aws:imagebuilder:ImageRecipe
properties:
blockDeviceMappings:
- deviceName: /dev/xvdb
ebs:
deleteOnTermination: true
volumeSize: 100
volumeType: gp2
components:
- componentArn: ${exampleAwsImagebuilderComponent.arn}
parameters:
- name: Parameter1
value: Value1
- name: Parameter2
value: Value2
name: example
parentImage: arn:${current.partition}:imagebuilder:${currentAwsRegion.name}:aws:image/amazon-linux-2-x86/x.x.x
version: 1.0.0

Import

Using pulumi import, import aws_imagebuilder_image_recipe resources using the Amazon Resource Name (ARN). For example:

$ pulumi import aws:imagebuilder/imageRecipe:ImageRecipe example arn:aws:imagebuilder:us-east-1:123456789012:image-recipe/example/1.0.0

Constructors

Link copied to clipboard
constructor(blockDeviceMappings: Output<List<ImageRecipeBlockDeviceMappingArgs>>? = null, components: Output<List<ImageRecipeComponentArgs>>? = null, description: Output<String>? = null, name: Output<String>? = null, parentImage: Output<String>? = null, systemsManagerAgent: Output<ImageRecipeSystemsManagerAgentArgs>? = null, tags: Output<Map<String, String>>? = null, userDataBase64: Output<String>? = null, version: Output<String>? = null, workingDirectory: Output<String>? = null)

Properties

Link copied to clipboard

Configuration block(s) with block device mappings for the image recipe. Detailed below.

Link copied to clipboard

Ordered configuration block(s) with components for the image recipe. Detailed below.

Link copied to clipboard
val description: Output<String>? = null

Description of the image recipe.

Link copied to clipboard
val name: Output<String>? = null

Name of the image recipe.

Link copied to clipboard
val parentImage: Output<String>? = null

The image recipe uses this image as a base from which to build your customized image. The value can be the base image ARN or an AMI ID.

Link copied to clipboard

Configuration block for the Systems Manager Agent installed by default by Image Builder. Detailed below.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

Key-value map of resource tags for the image recipe. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Link copied to clipboard
val userDataBase64: Output<String>? = null

Base64 encoded user data. Use this to provide commands or a command script to run when you launch your build instance.

Link copied to clipboard
val version: Output<String>? = null

The semantic version of the image recipe, which specifies the version in the following format, with numeric values in each position to indicate a specific version: major.minor.patch. For example: 1.0.0. The following attributes are optional:

Link copied to clipboard
val workingDirectory: Output<String>? = null

The working directory to be used during build and test workflows.

Functions

Link copied to clipboard
open override fun toJava(): ImageRecipeArgs