Try AWS Native preview for resources not in the classic version.
aws.imagebuilder.Component
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
Manages an Image Builder Component.
Example Usage
URI Document
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.ImageBuilder.Component("example", new()
{
Platform = "Linux",
Uri = $"s3://{aws_s3_object.Example.Bucket}/{aws_s3_object.Example.Key}",
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.NewComponent(ctx, "example", &imagebuilder.ComponentArgs{
Platform: pulumi.String("Linux"),
Uri: pulumi.String(fmt.Sprintf("s3://%v/%v", aws_s3_object.Example.Bucket, aws_s3_object.Example.Key)),
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.Component;
import com.pulumi.aws.imagebuilder.ComponentArgs;
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 Component("example", ComponentArgs.builder()
.platform("Linux")
.uri(String.format("s3://%s/%s", aws_s3_object.example().bucket(),aws_s3_object.example().key()))
.version("1.0.0")
.build());
}
}
import pulumi
import pulumi_aws as aws
example = aws.imagebuilder.Component("example",
platform="Linux",
uri=f"s3://{aws_s3_object['example']['bucket']}/{aws_s3_object['example']['key']}",
version="1.0.0")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.imagebuilder.Component("example", {
platform: "Linux",
uri: `s3://${aws_s3_object.example.bucket}/${aws_s3_object.example.key}`,
version: "1.0.0",
});
resources:
example:
type: aws:imagebuilder:Component
properties:
platform: Linux
uri: s3://${aws_s3_object.example.bucket}/${aws_s3_object.example.key}
version: 1.0.0
Create Component Resource
new Component(name: string, args: ComponentArgs, opts?: CustomResourceOptions);
@overload
def Component(resource_name: str,
opts: Optional[ResourceOptions] = None,
change_description: Optional[str] = None,
data: Optional[str] = None,
description: Optional[str] = None,
kms_key_id: Optional[str] = None,
name: Optional[str] = None,
platform: Optional[str] = None,
skip_destroy: Optional[bool] = None,
supported_os_versions: Optional[Sequence[str]] = None,
tags: Optional[Mapping[str, str]] = None,
uri: Optional[str] = None,
version: Optional[str] = None)
@overload
def Component(resource_name: str,
args: ComponentArgs,
opts: Optional[ResourceOptions] = None)
func NewComponent(ctx *Context, name string, args ComponentArgs, opts ...ResourceOption) (*Component, error)
public Component(string name, ComponentArgs args, CustomResourceOptions? opts = null)
public Component(String name, ComponentArgs args)
public Component(String name, ComponentArgs args, CustomResourceOptions options)
type: aws:imagebuilder:Component
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ComponentArgs
- 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 ComponentArgs
- 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 ComponentArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ComponentArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ComponentArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Component 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 Component resource accepts the following input properties:
- Platform string
Platform of the component.
- Version string
Version of the component.
The following attributes are optional:
- Change
Description string Change description of the component.
- Data string
Inline YAML string with data of the component. Exactly one of
data
anduri
can be specified. the provider will only perform drift detection of its value when present in a configuration.- Description string
Description of the component.
- Kms
Key stringId Amazon Resource Name (ARN) of the Key Management Service (KMS) Key used to encrypt the component.
- Name string
Name of the component.
- Skip
Destroy bool Whether to retain the old version when the resource is destroyed or replacement is necessary. Defaults to
false
.- Supported
Os List<string>Versions Set of Operating Systems (OS) supported by the component.
- Dictionary<string, string>
Key-value map of resource tags for the component. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.- Uri string
S3 URI with data of the component. Exactly one of
data
anduri
can be specified.NOTE: Updating
data
oruri
requires specifying a newversion
. This causes replacement of the resource. Theskip_destroy
argument can be used to retain the old version.
- Platform string
Platform of the component.
- Version string
Version of the component.
The following attributes are optional:
- Change
Description string Change description of the component.
- Data string
Inline YAML string with data of the component. Exactly one of
data
anduri
can be specified. the provider will only perform drift detection of its value when present in a configuration.- Description string
Description of the component.
- Kms
Key stringId Amazon Resource Name (ARN) of the Key Management Service (KMS) Key used to encrypt the component.
- Name string
Name of the component.
- Skip
Destroy bool Whether to retain the old version when the resource is destroyed or replacement is necessary. Defaults to
false
.- Supported
Os []stringVersions Set of Operating Systems (OS) supported by the component.
- map[string]string
Key-value map of resource tags for the component. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.- Uri string
S3 URI with data of the component. Exactly one of
data
anduri
can be specified.NOTE: Updating
data
oruri
requires specifying a newversion
. This causes replacement of the resource. Theskip_destroy
argument can be used to retain the old version.
- platform String
Platform of the component.
- version String
Version of the component.
The following attributes are optional:
- change
Description String Change description of the component.
- data String
Inline YAML string with data of the component. Exactly one of
data
anduri
can be specified. the provider will only perform drift detection of its value when present in a configuration.- description String
Description of the component.
- kms
Key StringId Amazon Resource Name (ARN) of the Key Management Service (KMS) Key used to encrypt the component.
- name String
Name of the component.
- skip
Destroy Boolean Whether to retain the old version when the resource is destroyed or replacement is necessary. Defaults to
false
.- supported
Os List<String>Versions Set of Operating Systems (OS) supported by the component.
- Map<String,String>
Key-value map of resource tags for the component. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.- uri String
S3 URI with data of the component. Exactly one of
data
anduri
can be specified.NOTE: Updating
data
oruri
requires specifying a newversion
. This causes replacement of the resource. Theskip_destroy
argument can be used to retain the old version.
- platform string
Platform of the component.
- version string
Version of the component.
The following attributes are optional:
- change
Description string Change description of the component.
- data string
Inline YAML string with data of the component. Exactly one of
data
anduri
can be specified. the provider will only perform drift detection of its value when present in a configuration.- description string
Description of the component.
- kms
Key stringId Amazon Resource Name (ARN) of the Key Management Service (KMS) Key used to encrypt the component.
- name string
Name of the component.
- skip
Destroy boolean Whether to retain the old version when the resource is destroyed or replacement is necessary. Defaults to
false
.- supported
Os string[]Versions Set of Operating Systems (OS) supported by the component.
- {[key: string]: string}
Key-value map of resource tags for the component. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.- uri string
S3 URI with data of the component. Exactly one of
data
anduri
can be specified.NOTE: Updating
data
oruri
requires specifying a newversion
. This causes replacement of the resource. Theskip_destroy
argument can be used to retain the old version.
- platform str
Platform of the component.
- version str
Version of the component.
The following attributes are optional:
- change_
description str Change description of the component.
- data str
Inline YAML string with data of the component. Exactly one of
data
anduri
can be specified. the provider will only perform drift detection of its value when present in a configuration.- description str
Description of the component.
- kms_
key_ strid Amazon Resource Name (ARN) of the Key Management Service (KMS) Key used to encrypt the component.
- name str
Name of the component.
- skip_
destroy bool Whether to retain the old version when the resource is destroyed or replacement is necessary. Defaults to
false
.- supported_
os_ Sequence[str]versions Set of Operating Systems (OS) supported by the component.
- Mapping[str, str]
Key-value map of resource tags for the component. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.- uri str
S3 URI with data of the component. Exactly one of
data
anduri
can be specified.NOTE: Updating
data
oruri
requires specifying a newversion
. This causes replacement of the resource. Theskip_destroy
argument can be used to retain the old version.
- platform String
Platform of the component.
- version String
Version of the component.
The following attributes are optional:
- change
Description String Change description of the component.
- data String
Inline YAML string with data of the component. Exactly one of
data
anduri
can be specified. the provider will only perform drift detection of its value when present in a configuration.- description String
Description of the component.
- kms
Key StringId Amazon Resource Name (ARN) of the Key Management Service (KMS) Key used to encrypt the component.
- name String
Name of the component.
- skip
Destroy Boolean Whether to retain the old version when the resource is destroyed or replacement is necessary. Defaults to
false
.- supported
Os List<String>Versions Set of Operating Systems (OS) supported by the component.
- Map<String>
Key-value map of resource tags for the component. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.- uri String
S3 URI with data of the component. Exactly one of
data
anduri
can be specified.NOTE: Updating
data
oruri
requires specifying a newversion
. This causes replacement of the resource. Theskip_destroy
argument can be used to retain the old version.
Outputs
All input properties are implicitly available as output properties. Additionally, the Component resource produces the following output properties:
- Arn string
(Required) Amazon Resource Name (ARN) of the component.
- Date
Created string Date the component was created.
- Encrypted bool
Encryption status of the component.
- Id string
The provider-assigned unique ID for this managed resource.
- Owner string
Owner of the component.
- Dictionary<string, string>
A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.Please use
tags
instead.- Type string
Type of the component.
- Arn string
(Required) Amazon Resource Name (ARN) of the component.
- Date
Created string Date the component was created.
- Encrypted bool
Encryption status of the component.
- Id string
The provider-assigned unique ID for this managed resource.
- Owner string
Owner of the component.
- map[string]string
A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.Please use
tags
instead.- Type string
Type of the component.
- arn String
(Required) Amazon Resource Name (ARN) of the component.
- date
Created String Date the component was created.
- encrypted Boolean
Encryption status of the component.
- id String
The provider-assigned unique ID for this managed resource.
- owner String
Owner of the component.
- Map<String,String>
A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.Please use
tags
instead.- type String
Type of the component.
- arn string
(Required) Amazon Resource Name (ARN) of the component.
- date
Created string Date the component was created.
- encrypted boolean
Encryption status of the component.
- id string
The provider-assigned unique ID for this managed resource.
- owner string
Owner of the component.
- {[key: string]: string}
A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.Please use
tags
instead.- type string
Type of the component.
- arn str
(Required) Amazon Resource Name (ARN) of the component.
- date_
created str Date the component was created.
- encrypted bool
Encryption status of the component.
- id str
The provider-assigned unique ID for this managed resource.
- owner str
Owner of the component.
- Mapping[str, str]
A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.Please use
tags
instead.- type str
Type of the component.
- arn String
(Required) Amazon Resource Name (ARN) of the component.
- date
Created String Date the component was created.
- encrypted Boolean
Encryption status of the component.
- id String
The provider-assigned unique ID for this managed resource.
- owner String
Owner of the component.
- Map<String>
A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.Please use
tags
instead.- type String
Type of the component.
Look up Existing Component Resource
Get an existing Component 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?: ComponentState, opts?: CustomResourceOptions): Component
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
arn: Optional[str] = None,
change_description: Optional[str] = None,
data: Optional[str] = None,
date_created: Optional[str] = None,
description: Optional[str] = None,
encrypted: Optional[bool] = None,
kms_key_id: Optional[str] = None,
name: Optional[str] = None,
owner: Optional[str] = None,
platform: Optional[str] = None,
skip_destroy: Optional[bool] = None,
supported_os_versions: Optional[Sequence[str]] = None,
tags: Optional[Mapping[str, str]] = None,
tags_all: Optional[Mapping[str, str]] = None,
type: Optional[str] = None,
uri: Optional[str] = None,
version: Optional[str] = None) -> Component
func GetComponent(ctx *Context, name string, id IDInput, state *ComponentState, opts ...ResourceOption) (*Component, error)
public static Component Get(string name, Input<string> id, ComponentState? state, CustomResourceOptions? opts = null)
public static Component get(String name, Output<String> id, ComponentState 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 component.
- Change
Description string Change description of the component.
- Data string
Inline YAML string with data of the component. Exactly one of
data
anduri
can be specified. the provider will only perform drift detection of its value when present in a configuration.- Date
Created string Date the component was created.
- Description string
Description of the component.
- Encrypted bool
Encryption status of the component.
- Kms
Key stringId Amazon Resource Name (ARN) of the Key Management Service (KMS) Key used to encrypt the component.
- Name string
Name of the component.
- Owner string
Owner of the component.
- Platform string
Platform of the component.
- Skip
Destroy bool Whether to retain the old version when the resource is destroyed or replacement is necessary. Defaults to
false
.- Supported
Os List<string>Versions Set of Operating Systems (OS) supported by the component.
- Dictionary<string, string>
Key-value map of resource tags for the component. 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.Please use
tags
instead.- Type string
Type of the component.
- Uri string
S3 URI with data of the component. Exactly one of
data
anduri
can be specified.NOTE: Updating
data
oruri
requires specifying a newversion
. This causes replacement of the resource. Theskip_destroy
argument can be used to retain the old version.- Version string
Version of the component.
The following attributes are optional:
- Arn string
(Required) Amazon Resource Name (ARN) of the component.
- Change
Description string Change description of the component.
- Data string
Inline YAML string with data of the component. Exactly one of
data
anduri
can be specified. the provider will only perform drift detection of its value when present in a configuration.- Date
Created string Date the component was created.
- Description string
Description of the component.
- Encrypted bool
Encryption status of the component.
- Kms
Key stringId Amazon Resource Name (ARN) of the Key Management Service (KMS) Key used to encrypt the component.
- Name string
Name of the component.
- Owner string
Owner of the component.
- Platform string
Platform of the component.
- Skip
Destroy bool Whether to retain the old version when the resource is destroyed or replacement is necessary. Defaults to
false
.- Supported
Os []stringVersions Set of Operating Systems (OS) supported by the component.
- map[string]string
Key-value map of resource tags for the component. 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.Please use
tags
instead.- Type string
Type of the component.
- Uri string
S3 URI with data of the component. Exactly one of
data
anduri
can be specified.NOTE: Updating
data
oruri
requires specifying a newversion
. This causes replacement of the resource. Theskip_destroy
argument can be used to retain the old version.- Version string
Version of the component.
The following attributes are optional:
- arn String
(Required) Amazon Resource Name (ARN) of the component.
- change
Description String Change description of the component.
- data String
Inline YAML string with data of the component. Exactly one of
data
anduri
can be specified. the provider will only perform drift detection of its value when present in a configuration.- date
Created String Date the component was created.
- description String
Description of the component.
- encrypted Boolean
Encryption status of the component.
- kms
Key StringId Amazon Resource Name (ARN) of the Key Management Service (KMS) Key used to encrypt the component.
- name String
Name of the component.
- owner String
Owner of the component.
- platform String
Platform of the component.
- skip
Destroy Boolean Whether to retain the old version when the resource is destroyed or replacement is necessary. Defaults to
false
.- supported
Os List<String>Versions Set of Operating Systems (OS) supported by the component.
- Map<String,String>
Key-value map of resource tags for the component. 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.Please use
tags
instead.- type String
Type of the component.
- uri String
S3 URI with data of the component. Exactly one of
data
anduri
can be specified.NOTE: Updating
data
oruri
requires specifying a newversion
. This causes replacement of the resource. Theskip_destroy
argument can be used to retain the old version.- version String
Version of the component.
The following attributes are optional:
- arn string
(Required) Amazon Resource Name (ARN) of the component.
- change
Description string Change description of the component.
- data string
Inline YAML string with data of the component. Exactly one of
data
anduri
can be specified. the provider will only perform drift detection of its value when present in a configuration.- date
Created string Date the component was created.
- description string
Description of the component.
- encrypted boolean
Encryption status of the component.
- kms
Key stringId Amazon Resource Name (ARN) of the Key Management Service (KMS) Key used to encrypt the component.
- name string
Name of the component.
- owner string
Owner of the component.
- platform string
Platform of the component.
- skip
Destroy boolean Whether to retain the old version when the resource is destroyed or replacement is necessary. Defaults to
false
.- supported
Os string[]Versions Set of Operating Systems (OS) supported by the component.
- {[key: string]: string}
Key-value map of resource tags for the component. 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.Please use
tags
instead.- type string
Type of the component.
- uri string
S3 URI with data of the component. Exactly one of
data
anduri
can be specified.NOTE: Updating
data
oruri
requires specifying a newversion
. This causes replacement of the resource. Theskip_destroy
argument can be used to retain the old version.- version string
Version of the component.
The following attributes are optional:
- arn str
(Required) Amazon Resource Name (ARN) of the component.
- change_
description str Change description of the component.
- data str
Inline YAML string with data of the component. Exactly one of
data
anduri
can be specified. the provider will only perform drift detection of its value when present in a configuration.- date_
created str Date the component was created.
- description str
Description of the component.
- encrypted bool
Encryption status of the component.
- kms_
key_ strid Amazon Resource Name (ARN) of the Key Management Service (KMS) Key used to encrypt the component.
- name str
Name of the component.
- owner str
Owner of the component.
- platform str
Platform of the component.
- skip_
destroy bool Whether to retain the old version when the resource is destroyed or replacement is necessary. Defaults to
false
.- supported_
os_ Sequence[str]versions Set of Operating Systems (OS) supported by the component.
- Mapping[str, str]
Key-value map of resource tags for the component. 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.Please use
tags
instead.- type str
Type of the component.
- uri str
S3 URI with data of the component. Exactly one of
data
anduri
can be specified.NOTE: Updating
data
oruri
requires specifying a newversion
. This causes replacement of the resource. Theskip_destroy
argument can be used to retain the old version.- version str
Version of the component.
The following attributes are optional:
- arn String
(Required) Amazon Resource Name (ARN) of the component.
- change
Description String Change description of the component.
- data String
Inline YAML string with data of the component. Exactly one of
data
anduri
can be specified. the provider will only perform drift detection of its value when present in a configuration.- date
Created String Date the component was created.
- description String
Description of the component.
- encrypted Boolean
Encryption status of the component.
- kms
Key StringId Amazon Resource Name (ARN) of the Key Management Service (KMS) Key used to encrypt the component.
- name String
Name of the component.
- owner String
Owner of the component.
- platform String
Platform of the component.
- skip
Destroy Boolean Whether to retain the old version when the resource is destroyed or replacement is necessary. Defaults to
false
.- supported
Os List<String>Versions Set of Operating Systems (OS) supported by the component.
- Map<String>
Key-value map of resource tags for the component. 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.Please use
tags
instead.- type String
Type of the component.
- uri String
S3 URI with data of the component. Exactly one of
data
anduri
can be specified.NOTE: Updating
data
oruri
requires specifying a newversion
. This causes replacement of the resource. Theskip_destroy
argument can be used to retain the old version.- version String
Version of the component.
The following attributes are optional:
Import
Using pulumi import
, import aws_imagebuilder_components
resources using the Amazon Resource Name (ARN). For example:
$ pulumi import aws:imagebuilder/component:Component example arn:aws:imagebuilder:us-east-1:123456789012:component/example/1.0.0/1
Certain resource arguments, such as uri
, cannot be read via the API and imported into the provider. The provider will display a difference for these arguments the first run after import if declared in the the provider configuration for an imported resource.
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.