Try AWS Native preview for resources not in the classic version.
aws.imagebuilder.ImageRecipe
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
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=[{
"deviceName": "/dev/xvdb",
"ebs": {
"deleteOnTermination": "true",
"volumeSize": 100,
"volumeType": "gp2",
},
}],
components=[{
"componentArn": 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")
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.String(fmt.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
})
}
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 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
Create ImageRecipe Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ImageRecipe(name: string, args: ImageRecipeArgs, opts?: CustomResourceOptions);
@overload
def ImageRecipe(resource_name: str,
args: ImageRecipeArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ImageRecipe(resource_name: str,
opts: Optional[ResourceOptions] = None,
components: Optional[Sequence[ImageRecipeComponentArgs]] = None,
parent_image: Optional[str] = None,
version: Optional[str] = None,
block_device_mappings: Optional[Sequence[ImageRecipeBlockDeviceMappingArgs]] = None,
description: Optional[str] = None,
name: Optional[str] = None,
systems_manager_agent: Optional[ImageRecipeSystemsManagerAgentArgs] = None,
tags: Optional[Mapping[str, str]] = None,
user_data_base64: Optional[str] = None,
working_directory: Optional[str] = None)
func NewImageRecipe(ctx *Context, name string, args ImageRecipeArgs, opts ...ResourceOption) (*ImageRecipe, error)
public ImageRecipe(string name, ImageRecipeArgs args, CustomResourceOptions? opts = null)
public ImageRecipe(String name, ImageRecipeArgs args)
public ImageRecipe(String name, ImageRecipeArgs args, CustomResourceOptions options)
type: aws:imagebuilder:ImageRecipe
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 ImageRecipeArgs
- 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 ImageRecipeArgs
- 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 ImageRecipeArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ImageRecipeArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ImageRecipeArgs
- 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 imageRecipeResource = new Aws.ImageBuilder.ImageRecipe("imageRecipeResource", new()
{
Components = new[]
{
new Aws.ImageBuilder.Inputs.ImageRecipeComponentArgs
{
ComponentArn = "string",
Parameters = new[]
{
new Aws.ImageBuilder.Inputs.ImageRecipeComponentParameterArgs
{
Name = "string",
Value = "string",
},
},
},
},
ParentImage = "string",
Version = "string",
BlockDeviceMappings = new[]
{
new Aws.ImageBuilder.Inputs.ImageRecipeBlockDeviceMappingArgs
{
DeviceName = "string",
Ebs = new Aws.ImageBuilder.Inputs.ImageRecipeBlockDeviceMappingEbsArgs
{
DeleteOnTermination = "string",
Encrypted = "string",
Iops = 0,
KmsKeyId = "string",
SnapshotId = "string",
Throughput = 0,
VolumeSize = 0,
VolumeType = "string",
},
NoDevice = false,
VirtualName = "string",
},
},
Description = "string",
Name = "string",
SystemsManagerAgent = new Aws.ImageBuilder.Inputs.ImageRecipeSystemsManagerAgentArgs
{
UninstallAfterBuild = false,
},
Tags =
{
{ "string", "string" },
},
UserDataBase64 = "string",
WorkingDirectory = "string",
});
example, err := imagebuilder.NewImageRecipe(ctx, "imageRecipeResource", &imagebuilder.ImageRecipeArgs{
Components: imagebuilder.ImageRecipeComponentArray{
&imagebuilder.ImageRecipeComponentArgs{
ComponentArn: pulumi.String("string"),
Parameters: imagebuilder.ImageRecipeComponentParameterArray{
&imagebuilder.ImageRecipeComponentParameterArgs{
Name: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
},
},
ParentImage: pulumi.String("string"),
Version: pulumi.String("string"),
BlockDeviceMappings: imagebuilder.ImageRecipeBlockDeviceMappingArray{
&imagebuilder.ImageRecipeBlockDeviceMappingArgs{
DeviceName: pulumi.String("string"),
Ebs: &imagebuilder.ImageRecipeBlockDeviceMappingEbsArgs{
DeleteOnTermination: pulumi.String("string"),
Encrypted: pulumi.String("string"),
Iops: pulumi.Int(0),
KmsKeyId: pulumi.String("string"),
SnapshotId: pulumi.String("string"),
Throughput: pulumi.Int(0),
VolumeSize: pulumi.Int(0),
VolumeType: pulumi.String("string"),
},
NoDevice: pulumi.Bool(false),
VirtualName: pulumi.String("string"),
},
},
Description: pulumi.String("string"),
Name: pulumi.String("string"),
SystemsManagerAgent: &imagebuilder.ImageRecipeSystemsManagerAgentArgs{
UninstallAfterBuild: pulumi.Bool(false),
},
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
UserDataBase64: pulumi.String("string"),
WorkingDirectory: pulumi.String("string"),
})
var imageRecipeResource = new ImageRecipe("imageRecipeResource", ImageRecipeArgs.builder()
.components(ImageRecipeComponentArgs.builder()
.componentArn("string")
.parameters(ImageRecipeComponentParameterArgs.builder()
.name("string")
.value("string")
.build())
.build())
.parentImage("string")
.version("string")
.blockDeviceMappings(ImageRecipeBlockDeviceMappingArgs.builder()
.deviceName("string")
.ebs(ImageRecipeBlockDeviceMappingEbsArgs.builder()
.deleteOnTermination("string")
.encrypted("string")
.iops(0)
.kmsKeyId("string")
.snapshotId("string")
.throughput(0)
.volumeSize(0)
.volumeType("string")
.build())
.noDevice(false)
.virtualName("string")
.build())
.description("string")
.name("string")
.systemsManagerAgent(ImageRecipeSystemsManagerAgentArgs.builder()
.uninstallAfterBuild(false)
.build())
.tags(Map.of("string", "string"))
.userDataBase64("string")
.workingDirectory("string")
.build());
image_recipe_resource = aws.imagebuilder.ImageRecipe("imageRecipeResource",
components=[{
"componentArn": "string",
"parameters": [{
"name": "string",
"value": "string",
}],
}],
parent_image="string",
version="string",
block_device_mappings=[{
"deviceName": "string",
"ebs": {
"deleteOnTermination": "string",
"encrypted": "string",
"iops": 0,
"kmsKeyId": "string",
"snapshotId": "string",
"throughput": 0,
"volumeSize": 0,
"volumeType": "string",
},
"noDevice": False,
"virtualName": "string",
}],
description="string",
name="string",
systems_manager_agent={
"uninstallAfterBuild": False,
},
tags={
"string": "string",
},
user_data_base64="string",
working_directory="string")
const imageRecipeResource = new aws.imagebuilder.ImageRecipe("imageRecipeResource", {
components: [{
componentArn: "string",
parameters: [{
name: "string",
value: "string",
}],
}],
parentImage: "string",
version: "string",
blockDeviceMappings: [{
deviceName: "string",
ebs: {
deleteOnTermination: "string",
encrypted: "string",
iops: 0,
kmsKeyId: "string",
snapshotId: "string",
throughput: 0,
volumeSize: 0,
volumeType: "string",
},
noDevice: false,
virtualName: "string",
}],
description: "string",
name: "string",
systemsManagerAgent: {
uninstallAfterBuild: false,
},
tags: {
string: "string",
},
userDataBase64: "string",
workingDirectory: "string",
});
type: aws:imagebuilder:ImageRecipe
properties:
blockDeviceMappings:
- deviceName: string
ebs:
deleteOnTermination: string
encrypted: string
iops: 0
kmsKeyId: string
snapshotId: string
throughput: 0
volumeSize: 0
volumeType: string
noDevice: false
virtualName: string
components:
- componentArn: string
parameters:
- name: string
value: string
description: string
name: string
parentImage: string
systemsManagerAgent:
uninstallAfterBuild: false
tags:
string: string
userDataBase64: string
version: string
workingDirectory: string
ImageRecipe 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 ImageRecipe resource accepts the following input properties:
- Components
List<Image
Recipe Component> - Ordered configuration block(s) with components for the image recipe. Detailed below.
- Parent
Image string - 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.
- Version string
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:
- Block
Device List<ImageMappings Recipe Block Device Mapping> - Configuration block(s) with block device mappings for the image recipe. Detailed below.
- Description string
- Description of the image recipe.
- Name string
- Name of the image recipe.
- Systems
Manager ImageAgent Recipe Systems Manager Agent - Configuration block for the Systems Manager Agent installed by default by Image Builder. Detailed below.
- Dictionary<string, string>
- 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. - User
Data stringBase64 - Base64 encoded user data. Use this to provide commands or a command script to run when you launch your build instance.
- Working
Directory string - The working directory to be used during build and test workflows.
- Components
[]Image
Recipe Component Args - Ordered configuration block(s) with components for the image recipe. Detailed below.
- Parent
Image string - 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.
- Version string
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:
- Block
Device []ImageMappings Recipe Block Device Mapping Args - Configuration block(s) with block device mappings for the image recipe. Detailed below.
- Description string
- Description of the image recipe.
- Name string
- Name of the image recipe.
- Systems
Manager ImageAgent Recipe Systems Manager Agent Args - Configuration block for the Systems Manager Agent installed by default by Image Builder. Detailed below.
- map[string]string
- 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. - User
Data stringBase64 - Base64 encoded user data. Use this to provide commands or a command script to run when you launch your build instance.
- Working
Directory string - The working directory to be used during build and test workflows.
- components
List<Image
Recipe Component> - Ordered configuration block(s) with components for the image recipe. Detailed below.
- parent
Image String - 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.
- version String
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:
- block
Device List<ImageMappings Recipe Block Device Mapping> - Configuration block(s) with block device mappings for the image recipe. Detailed below.
- description String
- Description of the image recipe.
- name String
- Name of the image recipe.
- systems
Manager ImageAgent Recipe Systems Manager Agent - Configuration block for the Systems Manager Agent installed by default by Image Builder. Detailed below.
- Map<String,String>
- 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. - user
Data StringBase64 - Base64 encoded user data. Use this to provide commands or a command script to run when you launch your build instance.
- working
Directory String - The working directory to be used during build and test workflows.
- components
Image
Recipe Component[] - Ordered configuration block(s) with components for the image recipe. Detailed below.
- parent
Image string - 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.
- version string
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:
- block
Device ImageMappings Recipe Block Device Mapping[] - Configuration block(s) with block device mappings for the image recipe. Detailed below.
- description string
- Description of the image recipe.
- name string
- Name of the image recipe.
- systems
Manager ImageAgent Recipe Systems Manager Agent - Configuration block for the Systems Manager Agent installed by default by Image Builder. Detailed below.
- {[key: string]: string}
- 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. - user
Data stringBase64 - Base64 encoded user data. Use this to provide commands or a command script to run when you launch your build instance.
- working
Directory string - The working directory to be used during build and test workflows.
- components
Sequence[Image
Recipe Component Args] - Ordered configuration block(s) with components for the image recipe. Detailed below.
- parent_
image str - 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.
- version str
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:
- block_
device_ Sequence[Imagemappings Recipe Block Device Mapping Args] - Configuration block(s) with block device mappings for the image recipe. Detailed below.
- description str
- Description of the image recipe.
- name str
- Name of the image recipe.
- systems_
manager_ Imageagent Recipe Systems Manager Agent Args - Configuration block for the Systems Manager Agent installed by default by Image Builder. Detailed below.
- Mapping[str, str]
- 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. - user_
data_ strbase64 - Base64 encoded user data. Use this to provide commands or a command script to run when you launch your build instance.
- working_
directory str - The working directory to be used during build and test workflows.
- components List<Property Map>
- Ordered configuration block(s) with components for the image recipe. Detailed below.
- parent
Image String - 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.
- version String
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:
- block
Device List<Property Map>Mappings - Configuration block(s) with block device mappings for the image recipe. Detailed below.
- description String
- Description of the image recipe.
- name String
- Name of the image recipe.
- systems
Manager Property MapAgent - Configuration block for the Systems Manager Agent installed by default by Image Builder. Detailed below.
- Map<String>
- 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. - user
Data StringBase64 - Base64 encoded user data. Use this to provide commands or a command script to run when you launch your build instance.
- working
Directory String - The working directory to be used during build and test workflows.
Outputs
All input properties are implicitly available as output properties. Additionally, the ImageRecipe resource produces the following output properties:
- Arn string
- (Required) Amazon Resource Name (ARN) of the image recipe.
- Date
Created string - Date the image recipe was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Owner string
- Owner of the image recipe.
- Platform string
- Platform of the image recipe.
- Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- Arn string
- (Required) Amazon Resource Name (ARN) of the image recipe.
- Date
Created string - Date the image recipe was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Owner string
- Owner of the image recipe.
- Platform string
- Platform of the image recipe.
- map[string]string
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn String
- (Required) Amazon Resource Name (ARN) of the image recipe.
- date
Created String - Date the image recipe was created.
- id String
- The provider-assigned unique ID for this managed resource.
- owner String
- Owner of the image recipe.
- platform String
- Platform of the image recipe.
- Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn string
- (Required) Amazon Resource Name (ARN) of the image recipe.
- date
Created string - Date the image recipe was created.
- id string
- The provider-assigned unique ID for this managed resource.
- owner string
- Owner of the image recipe.
- platform string
- Platform of the image recipe.
- {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn str
- (Required) Amazon Resource Name (ARN) of the image recipe.
- date_
created str - Date the image recipe was created.
- id str
- The provider-assigned unique ID for this managed resource.
- owner str
- Owner of the image recipe.
- platform str
- Platform of the image recipe.
- Mapping[str, str]
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn String
- (Required) Amazon Resource Name (ARN) of the image recipe.
- date
Created String - Date the image recipe was created.
- id String
- The provider-assigned unique ID for this managed resource.
- owner String
- Owner of the image recipe.
- platform String
- Platform of the image recipe.
- Map<String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
Look up Existing ImageRecipe Resource
Get an existing ImageRecipe 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?: ImageRecipeState, opts?: CustomResourceOptions): ImageRecipe
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
arn: Optional[str] = None,
block_device_mappings: Optional[Sequence[ImageRecipeBlockDeviceMappingArgs]] = None,
components: Optional[Sequence[ImageRecipeComponentArgs]] = None,
date_created: Optional[str] = None,
description: Optional[str] = None,
name: Optional[str] = None,
owner: Optional[str] = None,
parent_image: Optional[str] = None,
platform: Optional[str] = None,
systems_manager_agent: Optional[ImageRecipeSystemsManagerAgentArgs] = None,
tags: Optional[Mapping[str, str]] = None,
tags_all: Optional[Mapping[str, str]] = None,
user_data_base64: Optional[str] = None,
version: Optional[str] = None,
working_directory: Optional[str] = None) -> ImageRecipe
func GetImageRecipe(ctx *Context, name string, id IDInput, state *ImageRecipeState, opts ...ResourceOption) (*ImageRecipe, error)
public static ImageRecipe Get(string name, Input<string> id, ImageRecipeState? state, CustomResourceOptions? opts = null)
public static ImageRecipe get(String name, Output<String> id, ImageRecipeState 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.
- Arn string
- (Required) Amazon Resource Name (ARN) of the image recipe.
- Block
Device List<ImageMappings Recipe Block Device Mapping> - Configuration block(s) with block device mappings for the image recipe. Detailed below.
- Components
List<Image
Recipe Component> - Ordered configuration block(s) with components for the image recipe. Detailed below.
- Date
Created string - Date the image recipe was created.
- Description string
- Description of the image recipe.
- Name string
- Name of the image recipe.
- Owner string
- Owner of the image recipe.
- Parent
Image string - 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.
- Platform string
- Platform of the image recipe.
- Systems
Manager ImageAgent Recipe Systems Manager Agent - Configuration block for the Systems Manager Agent installed by default by Image Builder. Detailed below.
- Dictionary<string, string>
- 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. - Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - User
Data stringBase64 - Base64 encoded user data. Use this to provide commands or a command script to run when you launch your build instance.
- Version string
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:
- Working
Directory string - The working directory to be used during build and test workflows.
- Arn string
- (Required) Amazon Resource Name (ARN) of the image recipe.
- Block
Device []ImageMappings Recipe Block Device Mapping Args - Configuration block(s) with block device mappings for the image recipe. Detailed below.
- Components
[]Image
Recipe Component Args - Ordered configuration block(s) with components for the image recipe. Detailed below.
- Date
Created string - Date the image recipe was created.
- Description string
- Description of the image recipe.
- Name string
- Name of the image recipe.
- Owner string
- Owner of the image recipe.
- Parent
Image string - 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.
- Platform string
- Platform of the image recipe.
- Systems
Manager ImageAgent Recipe Systems Manager Agent Args - Configuration block for the Systems Manager Agent installed by default by Image Builder. Detailed below.
- map[string]string
- 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. - map[string]string
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - User
Data stringBase64 - Base64 encoded user data. Use this to provide commands or a command script to run when you launch your build instance.
- Version string
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:
- Working
Directory string - The working directory to be used during build and test workflows.
- arn String
- (Required) Amazon Resource Name (ARN) of the image recipe.
- block
Device List<ImageMappings Recipe Block Device Mapping> - Configuration block(s) with block device mappings for the image recipe. Detailed below.
- components
List<Image
Recipe Component> - Ordered configuration block(s) with components for the image recipe. Detailed below.
- date
Created String - Date the image recipe was created.
- description String
- Description of the image recipe.
- name String
- Name of the image recipe.
- owner String
- Owner of the image recipe.
- parent
Image String - 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.
- platform String
- Platform of the image recipe.
- systems
Manager ImageAgent Recipe Systems Manager Agent - Configuration block for the Systems Manager Agent installed by default by Image Builder. Detailed below.
- Map<String,String>
- 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. - Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - user
Data StringBase64 - Base64 encoded user data. Use this to provide commands or a command script to run when you launch your build instance.
- version String
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:
- working
Directory String - The working directory to be used during build and test workflows.
- arn string
- (Required) Amazon Resource Name (ARN) of the image recipe.
- block
Device ImageMappings Recipe Block Device Mapping[] - Configuration block(s) with block device mappings for the image recipe. Detailed below.
- components
Image
Recipe Component[] - Ordered configuration block(s) with components for the image recipe. Detailed below.
- date
Created string - Date the image recipe was created.
- description string
- Description of the image recipe.
- name string
- Name of the image recipe.
- owner string
- Owner of the image recipe.
- parent
Image string - 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.
- platform string
- Platform of the image recipe.
- systems
Manager ImageAgent Recipe Systems Manager Agent - Configuration block for the Systems Manager Agent installed by default by Image Builder. Detailed below.
- {[key: string]: string}
- 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. - {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - user
Data stringBase64 - Base64 encoded user data. Use this to provide commands or a command script to run when you launch your build instance.
- version string
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:
- working
Directory string - The working directory to be used during build and test workflows.
- arn str
- (Required) Amazon Resource Name (ARN) of the image recipe.
- block_
device_ Sequence[Imagemappings Recipe Block Device Mapping Args] - Configuration block(s) with block device mappings for the image recipe. Detailed below.
- components
Sequence[Image
Recipe Component Args] - Ordered configuration block(s) with components for the image recipe. Detailed below.
- date_
created str - Date the image recipe was created.
- description str
- Description of the image recipe.
- name str
- Name of the image recipe.
- owner str
- Owner of the image recipe.
- parent_
image str - 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.
- platform str
- Platform of the image recipe.
- systems_
manager_ Imageagent Recipe Systems Manager Agent Args - Configuration block for the Systems Manager Agent installed by default by Image Builder. Detailed below.
- Mapping[str, str]
- 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. - Mapping[str, str]
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - user_
data_ strbase64 - Base64 encoded user data. Use this to provide commands or a command script to run when you launch your build instance.
- version str
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:
- working_
directory str - The working directory to be used during build and test workflows.
- arn String
- (Required) Amazon Resource Name (ARN) of the image recipe.
- block
Device List<Property Map>Mappings - Configuration block(s) with block device mappings for the image recipe. Detailed below.
- components List<Property Map>
- Ordered configuration block(s) with components for the image recipe. Detailed below.
- date
Created String - Date the image recipe was created.
- description String
- Description of the image recipe.
- name String
- Name of the image recipe.
- owner String
- Owner of the image recipe.
- parent
Image String - 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.
- platform String
- Platform of the image recipe.
- systems
Manager Property MapAgent - Configuration block for the Systems Manager Agent installed by default by Image Builder. Detailed below.
- Map<String>
- 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. - Map<String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - user
Data StringBase64 - Base64 encoded user data. Use this to provide commands or a command script to run when you launch your build instance.
- version String
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:
- working
Directory String - The working directory to be used during build and test workflows.
Supporting Types
ImageRecipeBlockDeviceMapping, ImageRecipeBlockDeviceMappingArgs
- Device
Name string - Name of the device. For example,
/dev/sda
or/dev/xvdb
. - Ebs
Image
Recipe Block Device Mapping Ebs - Configuration block with Elastic Block Storage (EBS) block device mapping settings. Detailed below.
- No
Device bool - Set to
true
to remove a mapping from the parent image. - Virtual
Name string - Virtual device name. For example,
ephemeral0
. Instance store volumes are numbered starting from 0.
- Device
Name string - Name of the device. For example,
/dev/sda
or/dev/xvdb
. - Ebs
Image
Recipe Block Device Mapping Ebs - Configuration block with Elastic Block Storage (EBS) block device mapping settings. Detailed below.
- No
Device bool - Set to
true
to remove a mapping from the parent image. - Virtual
Name string - Virtual device name. For example,
ephemeral0
. Instance store volumes are numbered starting from 0.
- device
Name String - Name of the device. For example,
/dev/sda
or/dev/xvdb
. - ebs
Image
Recipe Block Device Mapping Ebs - Configuration block with Elastic Block Storage (EBS) block device mapping settings. Detailed below.
- no
Device Boolean - Set to
true
to remove a mapping from the parent image. - virtual
Name String - Virtual device name. For example,
ephemeral0
. Instance store volumes are numbered starting from 0.
- device
Name string - Name of the device. For example,
/dev/sda
or/dev/xvdb
. - ebs
Image
Recipe Block Device Mapping Ebs - Configuration block with Elastic Block Storage (EBS) block device mapping settings. Detailed below.
- no
Device boolean - Set to
true
to remove a mapping from the parent image. - virtual
Name string - Virtual device name. For example,
ephemeral0
. Instance store volumes are numbered starting from 0.
- device_
name str - Name of the device. For example,
/dev/sda
or/dev/xvdb
. - ebs
Image
Recipe Block Device Mapping Ebs - Configuration block with Elastic Block Storage (EBS) block device mapping settings. Detailed below.
- no_
device bool - Set to
true
to remove a mapping from the parent image. - virtual_
name str - Virtual device name. For example,
ephemeral0
. Instance store volumes are numbered starting from 0.
- device
Name String - Name of the device. For example,
/dev/sda
or/dev/xvdb
. - ebs Property Map
- Configuration block with Elastic Block Storage (EBS) block device mapping settings. Detailed below.
- no
Device Boolean - Set to
true
to remove a mapping from the parent image. - virtual
Name String - Virtual device name. For example,
ephemeral0
. Instance store volumes are numbered starting from 0.
ImageRecipeBlockDeviceMappingEbs, ImageRecipeBlockDeviceMappingEbsArgs
- Delete
On stringTermination - Whether to delete the volume on termination. Defaults to unset, which is the value inherited from the parent image.
- Encrypted string
- Whether to encrypt the volume. Defaults to unset, which is the value inherited from the parent image.
- Iops int
- Number of Input/Output (I/O) operations per second to provision for an
io1
orio2
volume. - Kms
Key stringId - Amazon Resource Name (ARN) of the Key Management Service (KMS) Key for encryption.
- Snapshot
Id string - Identifier of the EC2 Volume Snapshot.
- Throughput int
- For GP3 volumes only. The throughput in MiB/s that the volume supports.
- Volume
Size int - Size of the volume, in GiB.
- Volume
Type string - Type of the volume. For example,
gp2
orio2
.
- Delete
On stringTermination - Whether to delete the volume on termination. Defaults to unset, which is the value inherited from the parent image.
- Encrypted string
- Whether to encrypt the volume. Defaults to unset, which is the value inherited from the parent image.
- Iops int
- Number of Input/Output (I/O) operations per second to provision for an
io1
orio2
volume. - Kms
Key stringId - Amazon Resource Name (ARN) of the Key Management Service (KMS) Key for encryption.
- Snapshot
Id string - Identifier of the EC2 Volume Snapshot.
- Throughput int
- For GP3 volumes only. The throughput in MiB/s that the volume supports.
- Volume
Size int - Size of the volume, in GiB.
- Volume
Type string - Type of the volume. For example,
gp2
orio2
.
- delete
On StringTermination - Whether to delete the volume on termination. Defaults to unset, which is the value inherited from the parent image.
- encrypted String
- Whether to encrypt the volume. Defaults to unset, which is the value inherited from the parent image.
- iops Integer
- Number of Input/Output (I/O) operations per second to provision for an
io1
orio2
volume. - kms
Key StringId - Amazon Resource Name (ARN) of the Key Management Service (KMS) Key for encryption.
- snapshot
Id String - Identifier of the EC2 Volume Snapshot.
- throughput Integer
- For GP3 volumes only. The throughput in MiB/s that the volume supports.
- volume
Size Integer - Size of the volume, in GiB.
- volume
Type String - Type of the volume. For example,
gp2
orio2
.
- delete
On stringTermination - Whether to delete the volume on termination. Defaults to unset, which is the value inherited from the parent image.
- encrypted string
- Whether to encrypt the volume. Defaults to unset, which is the value inherited from the parent image.
- iops number
- Number of Input/Output (I/O) operations per second to provision for an
io1
orio2
volume. - kms
Key stringId - Amazon Resource Name (ARN) of the Key Management Service (KMS) Key for encryption.
- snapshot
Id string - Identifier of the EC2 Volume Snapshot.
- throughput number
- For GP3 volumes only. The throughput in MiB/s that the volume supports.
- volume
Size number - Size of the volume, in GiB.
- volume
Type string - Type of the volume. For example,
gp2
orio2
.
- delete_
on_ strtermination - Whether to delete the volume on termination. Defaults to unset, which is the value inherited from the parent image.
- encrypted str
- Whether to encrypt the volume. Defaults to unset, which is the value inherited from the parent image.
- iops int
- Number of Input/Output (I/O) operations per second to provision for an
io1
orio2
volume. - kms_
key_ strid - Amazon Resource Name (ARN) of the Key Management Service (KMS) Key for encryption.
- snapshot_
id str - Identifier of the EC2 Volume Snapshot.
- throughput int
- For GP3 volumes only. The throughput in MiB/s that the volume supports.
- volume_
size int - Size of the volume, in GiB.
- volume_
type str - Type of the volume. For example,
gp2
orio2
.
- delete
On StringTermination - Whether to delete the volume on termination. Defaults to unset, which is the value inherited from the parent image.
- encrypted String
- Whether to encrypt the volume. Defaults to unset, which is the value inherited from the parent image.
- iops Number
- Number of Input/Output (I/O) operations per second to provision for an
io1
orio2
volume. - kms
Key StringId - Amazon Resource Name (ARN) of the Key Management Service (KMS) Key for encryption.
- snapshot
Id String - Identifier of the EC2 Volume Snapshot.
- throughput Number
- For GP3 volumes only. The throughput in MiB/s that the volume supports.
- volume
Size Number - Size of the volume, in GiB.
- volume
Type String - Type of the volume. For example,
gp2
orio2
.
ImageRecipeComponent, ImageRecipeComponentArgs
- Component
Arn string - Amazon Resource Name (ARN) of the Image Builder Component to associate.
- Parameters
List<Image
Recipe Component Parameter> - Configuration block(s) for parameters to configure the component. Detailed below.
- Component
Arn string - Amazon Resource Name (ARN) of the Image Builder Component to associate.
- Parameters
[]Image
Recipe Component Parameter - Configuration block(s) for parameters to configure the component. Detailed below.
- component
Arn String - Amazon Resource Name (ARN) of the Image Builder Component to associate.
- parameters
List<Image
Recipe Component Parameter> - Configuration block(s) for parameters to configure the component. Detailed below.
- component
Arn string - Amazon Resource Name (ARN) of the Image Builder Component to associate.
- parameters
Image
Recipe Component Parameter[] - Configuration block(s) for parameters to configure the component. Detailed below.
- component_
arn str - Amazon Resource Name (ARN) of the Image Builder Component to associate.
- parameters
Sequence[Image
Recipe Component Parameter] - Configuration block(s) for parameters to configure the component. Detailed below.
- component
Arn String - Amazon Resource Name (ARN) of the Image Builder Component to associate.
- parameters List<Property Map>
- Configuration block(s) for parameters to configure the component. Detailed below.
ImageRecipeComponentParameter, ImageRecipeComponentParameterArgs
ImageRecipeSystemsManagerAgent, ImageRecipeSystemsManagerAgentArgs
- Uninstall
After boolBuild - Whether to remove the Systems Manager Agent after the image has been built. Defaults to
false
.
- Uninstall
After boolBuild - Whether to remove the Systems Manager Agent after the image has been built. Defaults to
false
.
- uninstall
After BooleanBuild - Whether to remove the Systems Manager Agent after the image has been built. Defaults to
false
.
- uninstall
After booleanBuild - Whether to remove the Systems Manager Agent after the image has been built. Defaults to
false
.
- uninstall_
after_ boolbuild - Whether to remove the Systems Manager Agent after the image has been built. Defaults to
false
.
- uninstall
After BooleanBuild - Whether to remove the Systems Manager Agent after the image has been built. Defaults to
false
.
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
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.
Try AWS Native preview for resources not in the classic version.