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 | aws.imagebuilder.infrastructure_configurations |
Fields
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. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | Name, InstanceProfileName, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all infrastructure_configurations
in a region.
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
FROM aws.imagebuilder.infrastructure_configurations
WHERE region = 'us-east-1';
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
FROM aws.imagebuilder.infrastructure_configurations
WHERE region = 'us-east-1' AND data__Identifier = '<Arn>';
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 aws.imagebuilder.infrastructure_configurations (
Name,
InstanceProfileName,
region
)
SELECT
'{{ Name }}',
'{{ InstanceProfileName }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.imagebuilder.infrastructure_configurations (
Name,
Description,
InstanceTypes,
SecurityGroupIds,
Logging,
SubnetId,
KeyPair,
TerminateInstanceOnFailure,
InstanceProfileName,
InstanceMetadataOptions,
SnsTopicArn,
ResourceTags,
Tags,
region
)
SELECT
'{{ Name }}',
'{{ Description }}',
'{{ InstanceTypes }}',
'{{ SecurityGroupIds }}',
'{{ Logging }}',
'{{ SubnetId }}',
'{{ KeyPair }}',
'{{ TerminateInstanceOnFailure }}',
'{{ InstanceProfileName }}',
'{{ InstanceMetadataOptions }}',
'{{ SnsTopicArn }}',
'{{ ResourceTags }}',
'{{ Tags }}',
'{{ 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: InstanceTypes
value:
- '{{ InstanceTypes[0] }}'
- name: SecurityGroupIds
value:
- '{{ SecurityGroupIds[0] }}'
- name: Logging
value:
S3Logs:
S3BucketName: '{{ S3BucketName }}'
S3KeyPrefix: '{{ S3KeyPrefix }}'
- name: SubnetId
value: '{{ SubnetId }}'
- name: KeyPair
value: '{{ KeyPair }}'
- name: TerminateInstanceOnFailure
value: '{{ TerminateInstanceOnFailure }}'
- name: InstanceProfileName
value: '{{ InstanceProfileName }}'
- name: InstanceMetadataOptions
value:
HttpPutResponseHopLimit: '{{ HttpPutResponseHopLimit }}'
HttpTokens: '{{ HttpTokens }}'
- name: SnsTopicArn
value: '{{ SnsTopicArn }}'
- name: ResourceTags
value: {}
- name: Tags
value: {}
DELETE
example
/*+ delete */
DELETE FROM aws.imagebuilder.infrastructure_configurations
WHERE data__Identifier = '<Arn>'
AND region = 'us-east-1';
Permissions
To operate on the infrastructure_configurations
resource, the following permissions are required:
Create
iam:PassRole,
iam:GetRole,
iam:GetInstanceProfile,
iam:CreateServiceLinkedRole,
sns:Publish,
imagebuilder:TagResource,
imagebuilder:GetInfrastructureConfiguration,
imagebuilder:CreateInfrastructureConfiguration
Update
iam:PassRole,
sns:Publish,
imagebuilder:GetInfrastructureConfiguration,
imagebuilder:UpdateInfrastructureConfiguration
Read
imagebuilder:GetInfrastructureConfiguration
Delete
imagebuilder:UnTagResource,
imagebuilder:GetInfrastructureConfiguration,
imagebuilder:DeleteInfrastructureConfiguration
List
imagebuilder:ListInfrastructureConfigurations