AWS OpsWorks Instance
This page shows how to write Terraform and CloudFormation for OpsWorks Instance and write them securely.
aws_opsworks_instance (Terraform)
The Instance in OpsWorks can be configured in Terraform with the resource name aws_opsworks_instance
. The following sections describe 1 example of how to use the resource and its parameters.
Example Usage from GitHub
resource "aws_opsworks_instance" "apache2-instance" {
stack_id = aws_opsworks_stack.mainstack.id
layer_ids = [aws_opsworks_custom_layer.mainlayer.id]
Parameters
-
agent_version
optional - string -
ami_id
optional computed - string -
architecture
optional - string -
auto_scaling_type
optional - string -
availability_zone
optional computed - string -
created_at
optional computed - string -
delete_ebs
optional - bool -
delete_eip
optional - bool -
ebs_optimized
optional - bool -
ec2_instance_id
optional computed - string -
ecs_cluster_arn
optional computed - string -
elastic_ip
optional computed - string -
hostname
optional computed - string -
id
optional computed - string -
infrastructure_class
optional computed - string -
install_updates_on_boot
optional - bool -
instance_profile_arn
optional computed - string -
instance_type
optional - string -
last_service_error_id
optional computed - string -
layer_ids
required - list of string -
os
optional computed - string -
platform
optional computed - string -
private_dns
optional computed - string -
private_ip
optional computed - string -
public_dns
optional computed - string -
public_ip
optional computed - string -
registered_by
optional computed - string -
reported_agent_version
optional computed - string -
reported_os_family
optional computed - string -
reported_os_name
optional computed - string -
reported_os_version
optional computed - string -
root_device_type
optional computed - string -
root_device_volume_id
optional computed - string -
security_group_ids
optional computed - list of string -
ssh_host_dsa_key_fingerprint
optional computed - string -
ssh_host_rsa_key_fingerprint
optional computed - string -
ssh_key_name
optional computed - string -
stack_id
required - string -
state
optional - string -
status
optional computed - string -
subnet_id
optional computed - string -
tenancy
optional computed - string -
virtualization_type
optional computed - string -
ebs_block_device
set block-
delete_on_termination
optional - bool -
device_name
required - string -
iops
optional computed - number -
snapshot_id
optional computed - string -
volume_size
optional computed - number -
volume_type
optional computed - string
-
-
ephemeral_block_device
set block-
device_name
required - string -
virtual_name
required - string
-
-
root_block_device
set block-
delete_on_termination
optional - bool -
iops
optional computed - number -
volume_size
optional computed - number -
volume_type
optional computed - string
-
-
timeouts
single block
Explanation in Terraform Registry
Provides an OpsWorks instance resource.
AWS::OpsWorks::Instance (CloudFormation)
The Instance in OpsWorks can be configured in CloudFormation with the resource name AWS::OpsWorks::Instance
. The following sections describe how to use the resource and its parameters.
Example Usage from GitHub
An example could not be found in GitHub.
Parameters
-
AgentVersion
optional - String -
AmiId
optional - String -
Architecture
optional - String -
AutoScalingType
optional - String -
AvailabilityZone
optional - String -
BlockDeviceMappings
optional - List of BlockDeviceMapping -
EbsOptimized
optional - Boolean -
ElasticIps
optional - List -
Hostname
optional - String -
InstallUpdatesOnBoot
optional - Boolean -
InstanceType
required - String -
LayerIds
required - List -
Os
optional - String -
RootDeviceType
optional - String -
SshKeyName
optional - String -
StackId
required - String -
SubnetId
optional - String -
Tenancy
optional - String -
TimeBasedAutoScaling
optional - TimeBasedAutoScaling -
VirtualizationType
optional - String -
Volumes
optional - List
Explanation in CloudFormation Registry
Creates an instance in a specified stack. For more information, see Adding an Instance to a Layer. Required Permissions: To use this action, an IAM user must have a Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions.
Frequently asked questions
What is AWS OpsWorks Instance?
AWS OpsWorks Instance is a resource for OpsWorks of Amazon Web Service. Settings can be wrote in Terraform and CloudFormation.
Where can I find the example code for the AWS OpsWorks Instance?
For Terraform, the 1smii/iac_terraform_aws source code example is useful. See the Terraform Example section for further details.