Resource: aws_opsworks_custom_layer

Provides an OpsWorks custom layer resource.

Example Usage

resource "aws_opsworks_custom_layer" "custlayer" {
  name       = "My Awesome Custom Layer"
  short_name = "awesome"
  stack_id   = aws_opsworks_stack.main.id
}

Argument Reference

This resource supports the following arguments:

The following extra optional arguments, all lists of Chef recipe names, allow custom Chef recipes to be applied to layer instances at the five different lifecycle events, if custom cookbooks are enabled on the layer's stack:

EBS Volume

Cloudwatch Configuration

Log Streams

Load Based Autoscaling

The downscaling and upscaling blocks supports the following arguments:

Though the three thresholds are optional, at least one threshold must be set when using load-based autoscaling.

Attribute Reference

This resource exports the following attributes in addition to the arguments above:

Import

In Terraform v1.5.0 and later, use an import block to import OpsWorks Custom Layers using the id. For example:

import {
  to = aws_opsworks_custom_layer.bar
  id = "00000000-0000-0000-0000-000000000000"
}

Using terraform import, import OpsWorks Custom Layers using the id. For example:

% terraform import aws_opsworks_custom_layer.bar 00000000-0000-0000-0000-000000000000