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_versionoptional - string -
ami_idoptional computed - string -
architectureoptional - string -
auto_scaling_typeoptional - string -
availability_zoneoptional computed - string -
created_atoptional computed - string -
delete_ebsoptional - bool -
delete_eipoptional - bool -
ebs_optimizedoptional - bool -
ec2_instance_idoptional computed - string -
ecs_cluster_arnoptional computed - string -
elastic_ipoptional computed - string -
hostnameoptional computed - string -
idoptional computed - string -
infrastructure_classoptional computed - string -
install_updates_on_bootoptional - bool -
instance_profile_arnoptional computed - string -
instance_typeoptional - string -
last_service_error_idoptional computed - string -
layer_idsrequired - list of string -
osoptional computed - string -
platformoptional computed - string -
private_dnsoptional computed - string -
private_ipoptional computed - string -
public_dnsoptional computed - string -
public_ipoptional computed - string -
registered_byoptional computed - string -
reported_agent_versionoptional computed - string -
reported_os_familyoptional computed - string -
reported_os_nameoptional computed - string -
reported_os_versionoptional computed - string -
root_device_typeoptional computed - string -
root_device_volume_idoptional computed - string -
security_group_idsoptional computed - list of string -
ssh_host_dsa_key_fingerprintoptional computed - string -
ssh_host_rsa_key_fingerprintoptional computed - string -
ssh_key_nameoptional computed - string -
stack_idrequired - string -
stateoptional - string -
statusoptional computed - string -
subnet_idoptional computed - string -
tenancyoptional computed - string -
virtualization_typeoptional computed - string -
ebs_block_deviceset block-
delete_on_terminationoptional - bool -
device_namerequired - string -
iopsoptional computed - number -
snapshot_idoptional computed - string -
volume_sizeoptional computed - number -
volume_typeoptional computed - string
-
-
ephemeral_block_deviceset block-
device_namerequired - string -
virtual_namerequired - string
-
-
root_block_deviceset block-
delete_on_terminationoptional - bool -
iopsoptional computed - number -
volume_sizeoptional computed - number -
volume_typeoptional computed - string
-
-
timeoutssingle 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
-
AgentVersionoptional - String -
AmiIdoptional - String -
Architectureoptional - String -
AutoScalingTypeoptional - String -
AvailabilityZoneoptional - String -
BlockDeviceMappingsoptional - List of BlockDeviceMapping -
EbsOptimizedoptional - Boolean -
ElasticIpsoptional - List -
Hostnameoptional - String -
InstallUpdatesOnBootoptional - Boolean -
InstanceTyperequired - String -
LayerIdsrequired - List -
Osoptional - String -
RootDeviceTypeoptional - String -
SshKeyNameoptional - String -
StackIdrequired - String -
SubnetIdoptional - String -
Tenancyoptional - String -
TimeBasedAutoScalingoptional - TimeBasedAutoScaling -
VirtualizationTypeoptional - String -
Volumesoptional - 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.