Skip to content

Resource: awsOpsworksMemcachedLayer

Provides an OpsWorks memcached layer resource.

Example Usage

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.opsworksMemcachedLayer.OpsworksMemcachedLayer(this, "cache", {
  stackId: "${aws_opsworks_stack.main.id}",
});

Argument Reference

The following arguments are supported:

  • stackId - (Required) ID of the stack the layer will belong to.
  • name - (Optional) A human-readable name for the layer.
  • allocatedMemory - (Optional) Amount of memory to allocate for the cache on each instance, in megabytes. Defaults to 512MB.
  • autoAssignElasticIps - (Optional) Whether to automatically assign an elastic IP address to the layer's instances.
  • autoAssignPublicIps - (Optional) For stacks belonging to a VPC, whether to automatically assign a public IP address to each of the layer's instances.
  • customInstanceProfileArn - (Optional) The ARN of an IAM profile that will be used for the layer's instances.
  • customSecurityGroupIds - (Optional) Ids for a set of security groups to apply to the layer's instances.
  • autoHealing - (Optional) Whether to enable auto-healing for the layer.
  • installUpdatesOnBoot - (Optional) Whether to install OS and package updates on each instance when it boots.
  • instanceShutdownTimeout - (Optional) The time, in seconds, that OpsWorks will wait for Chef to complete after triggering the Shutdown event.
  • elasticLoadBalancer - (Optional) Name of an Elastic Load Balancer to attach to this layer
  • drainElbOnShutdown - (Optional) Whether to enable Elastic Load Balancing connection draining.
  • systemPackages - (Optional) Names of a set of system packages to install on the layer's instances.
  • useEbsOptimizedInstances - (Optional) Whether to use EBS-optimized instances.
  • ebsVolume - (Optional) ebsVolume blocks, as described below, will each create an EBS volume and connect it to the layer's instances.
  • customJson - (Optional) Custom JSON attributes to apply to the layer.
  • tags - (Optional) A map of tags to assign to the resource. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

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:

  • customConfigureRecipes
  • customDeployRecipes
  • customSetupRecipes
  • customShutdownRecipes
  • customUndeployRecipes

An ebsVolume block supports the following arguments:

  • mountPoint - (Required) The path to mount the EBS volume on the layer's instances.
  • size - (Required) The size of the volume in gigabytes.
  • numberOfDisks - (Required) The number of disks to use for the EBS volume.
  • raidLevel - (Required) The RAID level to use for the volume.
  • type - (Optional) The type of volume to create. This may be standard (the default), io1 or gp2.
  • iops - (Optional) For PIOPS volumes, the IOPS per disk.

Attributes Reference

In addition to all arguments above, the following attributes are exported:

  • id - The id of the layer.
  • arn - The Amazon Resource Name(ARN) of the layer.
  • tagsAll - A map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.