AWS OpsWorks Permission
This page shows how to write Terraform and CloudFormation for OpsWorks Permission and write them securely.
aws_opsworks_permission (Terraform)
The Permission in OpsWorks can be configured in Terraform with the resource name aws_opsworks_permission. The following sections describe 4 examples of how to use the resource and its parameters.
Example Usage from GitHub
resource "aws_opsworks_permission" "opsworks_permission" {
count = var.enable_opsworks_permission ? 1 : 0
stack_id = var.opsworks_permission_stack_id != "" && !var.enable_opsworks_stack ? var.opsworks_permission_stack_id : element(concat(aws_opsworks_stack.opsworks_stack.*.id, [""]), 0)
user_arn = var.opsworks_permission_user_arn
resource "aws_opsworks_permission" "this" {
allow_ssh = var.allow_ssh
allow_sudo = var.allow_sudo
level = var.level
stack_id = var.stack_id
user_arn = var.user_arn
resource "aws_opsworks_permission" "opsworks_permission" {
count = var.enable_opsworks_permission ? 1 : 0
stack_id = var.opsworks_permission_stack_id != "" && !var.enable_opsworks_stack ? var.opsworks_permission_stack_id : element(concat(aws_opsworks_stack.opsworks_stack.*.id, [""]), 0)
user_arn = var.opsworks_permission_user_arn
resource "aws_opsworks_permission" "stack_permission_user" {
allow_ssh = var.allow_ssh
allow_sudo = var.allow_sudo
user_arn = var.user_arn
stack_id = var.stack_id
}
Parameters
-
allow_sshoptional computed - bool -
allow_sudooptional computed - bool -
idoptional computed - string -
leveloptional computed - string -
stack_idoptional computed - string -
user_arnrequired - string
Explanation in Terraform Registry
Provides an OpsWorks permission 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 Permission?
AWS OpsWorks Permission 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 Permission?
For Terraform, the asrkata/SebastianUA-terraform, niveklabs/aws and SebastianUA/terraform source code examples are useful. See the Terraform Example section for further details.