AWS OpsWorks Static Web Layer
This page shows how to write Terraform and CloudFormation for OpsWorks Static Web Layer and write them securely.
aws_opsworks_static_web_layer (Terraform)
The Static Web Layer in OpsWorks can be configured in Terraform with the resource name aws_opsworks_static_web_layer. The following sections describe 2 examples of how to use the resource and its parameters.
Example Usage from GitHub
resource "aws_opsworks_static_web_layer" "web" {
stack_id = aws_opsworks_stack.main.id
name = "web servers"
install_updates_on_boot = true
use_ebs_optimized_instances = true
auto_assign_public_ips = true
resource "aws_opsworks_static_web_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
Parameters
-
arnoptional computed - string -
auto_assign_elastic_ipsoptional - bool -
auto_assign_public_ipsoptional - bool -
auto_healingoptional - bool -
custom_configure_recipesoptional - list of string -
custom_deploy_recipesoptional - list of string -
custom_instance_profile_arnoptional - string -
custom_jsonoptional - string -
custom_security_group_idsoptional - set of string -
custom_setup_recipesoptional - list of string -
custom_shutdown_recipesoptional - list of string -
custom_undeploy_recipesoptional - list of string -
drain_elb_on_shutdownoptional - bool -
elastic_load_balanceroptional - string -
idoptional computed - string -
install_updates_on_bootoptional - bool -
instance_shutdown_timeoutoptional - number -
nameoptional - string -
stack_idrequired - string -
system_packagesoptional - set of string -
tagsoptional - map from string to string -
use_ebs_optimized_instancesoptional - bool -
ebs_volumeset block-
encryptedoptional - bool -
iopsoptional - number -
mount_pointrequired - string -
number_of_disksrequired - number -
raid_leveloptional - string -
sizerequired - number -
typeoptional - string
-
Explanation in Terraform Registry
Provides an OpsWorks static web server layer resource.
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
-
Attributesoptional - Map -
AutoAssignElasticIpsrequired - Boolean -
AutoAssignPublicIpsrequired - Boolean -
CustomInstanceProfileArnoptional - String -
CustomJsonoptional - Json -
CustomRecipesoptional - Recipes -
CustomSecurityGroupIdsoptional - List -
EnableAutoHealingrequired - Boolean -
InstallUpdatesOnBootoptional - Boolean -
LifecycleEventConfigurationoptional - LifecycleEventConfiguration -
LoadBasedAutoScalingoptional - LoadBasedAutoScaling -
Namerequired - String -
Packagesoptional - List -
Shortnamerequired - String -
StackIdrequired - String -
Tagsoptional - List of Tag -
Typerequired - String -
UseEbsOptimizedInstancesoptional - Boolean -
VolumeConfigurationsoptional - List of VolumeConfiguration
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 Static Web Layer?
AWS OpsWorks Static Web 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 Static Web Layer?
For Terraform, the mpechner/terraform_play and niveklabs/aws source code examples are useful. See the Terraform Example section for further details.