AWS OpsWorks MySQL Layer

This page shows how to write Terraform and CloudFormation for OpsWorks MySQL Layer and write them securely.

aws_opsworks_mysql_layer (Terraform)

The MySQL Layer in OpsWorks can be configured in Terraform with the resource name aws_opsworks_mysql_layer. The following sections describe 1 example of how to use the resource and its parameters.

Example Usage from GitHub

main.tf#L7
resource "aws_opsworks_mysql_layer" "this" {
  auto_assign_elastic_ips        = var.auto_assign_elastic_ips
  auto_assign_public_ips         = var.auto_assign_public_ips
  auto_healing                   = var.auto_healing
  custom_configure_recipes       = var.custom_configure_recipes
  custom_deploy_recipes          = var.custom_deploy_recipes

Review your Terraform file for AWS best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).

Parameters

Explanation in Terraform Registry

Provides an OpsWorks MySQL layer resource.

Note: All arguments including the root password will be stored in the raw state as plain-text. Read more about sensitive data in state.

AWS::OpsWorks::Layer (CloudFormation)

The Layer in OpsWorks can be configured in CloudFormation with the resource name AWS::OpsWorks::Layer. 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

Explanation in CloudFormation Registry

Creates a layer. For more information, see How to Create a Layer.

Note You should use CreateLayer for noncustom layer types such as PHP App Server only if the stack does not have an existing layer of that type. A stack can have at most one instance of each noncustom layer; if you attempt to create a second instance, CreateLayer fails. A stack can have an arbitrary number of custom layers, so you can call CreateLayer as many times as you like for that layer type. 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 MySQL Layer?

AWS OpsWorks MySQL Layer 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 MySQL Layer?

For Terraform, the niveklabs/aws source code example is useful. See the Terraform Example section for further details.