infrastructure_configurations
Creates, updates, deletes or gets an infrastructure_configuration resource or lists infrastructure_configurations in a region
Overview
| Name | infrastructure_configurations |
| Type | Resource |
| Description | Resource schema for AWS::ImageBuilder::InfrastructureConfiguration |
| Id | awscc.imagebuilder.infrastructure_configurations |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
arn | string | The Amazon Resource Name (ARN) of the infrastructure configuration. |
name | string | The name of the infrastructure configuration. |
description | string | The description of the infrastructure configuration. |
instance_types | array | The instance types of the infrastructure configuration. |
security_group_ids | array | The security group IDs of the infrastructure configuration. |
logging | object | The logging configuration of the infrastructure configuration. |
subnet_id | string | The subnet ID of the infrastructure configuration. |
key_pair | string | The EC2 key pair of the infrastructure configuration.. |
terminate_instance_on_failure | boolean | The terminate instance on failure configuration of the infrastructure configuration. |
instance_profile_name | string | The instance profile of the infrastructure configuration. |
instance_metadata_options | object | The instance metadata option settings for the infrastructure configuration. |
sns_topic_arn | string | The SNS Topic Amazon Resource Name (ARN) of the infrastructure configuration. |
resource_tags | object | The tags attached to the resource created by Image Builder. |
tags | object | The tags associated with the component. |
placement | object | The placement option settings for the infrastructure configuration. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
arn | string | The Amazon Resource Name (ARN) of the infrastructure configuration. |
region | string | AWS region. |
For more information, see AWS::ImageBuilder::InfrastructureConfiguration.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | infrastructure_configurations | INSERT | Name, InstanceProfileName, region |
delete_resource | infrastructure_configurations | DELETE | Identifier, region |
update_resource | infrastructure_configurations | UPDATE | Identifier, PatchDocument, region |
list_resources | infrastructure_configurations_list_only | SELECT | region |
get_resource | infrastructure_configurations | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual infrastructure_configuration.
SELECT
region,
arn,
name,
description,
instance_types,
security_group_ids,
logging,
subnet_id,
key_pair,
terminate_instance_on_failure,
instance_profile_name,
instance_metadata_options,
sns_topic_arn,
resource_tags,
tags,
placement
FROM awscc.imagebuilder.infrastructure_configurations
WHERE
region = 'us-east-1' AND
Identifier = '{{ arn }}';
Lists all infrastructure_configurations in a region.
SELECT
region,
arn
FROM awscc.imagebuilder.infrastructure_configurations_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new infrastructure_configuration resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.imagebuilder.infrastructure_configurations (
Name,
InstanceProfileName,
region
)
SELECT
'{{ name }}',
'{{ instance_profile_name }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.imagebuilder.infrastructure_configurations (
Name,
Description,
InstanceTypes,
SecurityGroupIds,
Logging,
SubnetId,
KeyPair,
TerminateInstanceOnFailure,
InstanceProfileName,
InstanceMetadataOptions,
SnsTopicArn,
ResourceTags,
Tags,
Placement,
region
)
SELECT
'{{ name }}',
'{{ description }}',
'{{ instance_types }}',
'{{ security_group_ids }}',
'{{ logging }}',
'{{ subnet_id }}',
'{{ key_pair }}',
'{{ terminate_instance_on_failure }}',
'{{ instance_profile_name }}',
'{{ instance_metadata_options }}',
'{{ sns_topic_arn }}',
'{{ resource_tags }}',
'{{ tags }}',
'{{ placement }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: infrastructure_configuration
props:
- name: name
value: '{{ name }}'
- name: description
value: '{{ description }}'
- name: instance_types
value:
- '{{ instance_types[0] }}'
- name: security_group_ids
value:
- '{{ security_group_ids[0] }}'
- name: logging
value:
s3_logs:
s3_bucket_name: '{{ s3_bucket_name }}'
s3_key_prefix: '{{ s3_key_prefix }}'
- name: subnet_id
value: '{{ subnet_id }}'
- name: key_pair
value: '{{ key_pair }}'
- name: terminate_instance_on_failure
value: '{{ terminate_instance_on_failure }}'
- name: instance_profile_name
value: '{{ instance_profile_name }}'
- name: instance_metadata_options
value:
http_put_response_hop_limit: '{{ http_put_response_hop_limit }}'
http_tokens: '{{ http_tokens }}'
- name: sns_topic_arn
value: '{{ sns_topic_arn }}'
- name: resource_tags
value: {}
- name: tags
value: {}
- name: placement
value:
availability_zone: '{{ availability_zone }}'
tenancy: '{{ tenancy }}'
host_id: '{{ host_id }}'
host_resource_group_arn: '{{ host_resource_group_arn }}'
UPDATE example
Use the following StackQL query and manifest file to update a infrastructure_configuration resource, using stack-deploy.
/*+ update */
UPDATE awscc.imagebuilder.infrastructure_configurations
SET PatchDocument = string('{{ {
"Description": description,
"InstanceTypes": instance_types,
"SecurityGroupIds": security_group_ids,
"Logging": logging,
"SubnetId": subnet_id,
"KeyPair": key_pair,
"TerminateInstanceOnFailure": terminate_instance_on_failure,
"InstanceProfileName": instance_profile_name,
"InstanceMetadataOptions": instance_metadata_options,
"SnsTopicArn": sns_topic_arn,
"ResourceTags": resource_tags,
"Tags": tags,
"Placement": placement
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}';
DELETE example
/*+ delete */
DELETE FROM awscc.imagebuilder.infrastructure_configurations
WHERE
Identifier = '{{ arn }}' AND
region = 'us-east-1';
Permissions
To operate on the infrastructure_configurations resource, the following permissions are required:
- Create
- Update
- Read
- Delete
- List
iam:PassRole,
iam:GetRole,
iam:GetInstanceProfile,
iam:CreateServiceLinkedRole,
sns:Publish,
imagebuilder:TagResource,
imagebuilder:GetInfrastructureConfiguration,
imagebuilder:CreateInfrastructureConfiguration
iam:PassRole,
sns:Publish,
imagebuilder:GetInfrastructureConfiguration,
imagebuilder:UpdateInfrastructureConfiguration,
imagebuilder:TagResource,
imagebuilder:UntagResource
imagebuilder:GetInfrastructureConfiguration
imagebuilder:UntagResource,
imagebuilder:GetInfrastructureConfiguration,
imagebuilder:DeleteInfrastructureConfiguration
imagebuilder:ListInfrastructureConfigurations