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_ssh
optional computed - bool -
allow_sudo
optional computed - bool -
id
optional computed - string -
level
optional computed - string -
stack_id
optional computed - string -
user_arn
required - 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
-
AgentVersion
optional - String -
AmiId
optional - String -
Architecture
optional - String -
AutoScalingType
optional - String -
AvailabilityZone
optional - String -
BlockDeviceMappings
optional - List of BlockDeviceMapping -
EbsOptimized
optional - Boolean -
ElasticIps
optional - List -
Hostname
optional - String -
InstallUpdatesOnBoot
optional - Boolean -
InstanceType
required - String -
LayerIds
required - List -
Os
optional - String -
RootDeviceType
optional - String -
SshKeyName
optional - String -
StackId
required - String -
SubnetId
optional - String -
Tenancy
optional - String -
TimeBasedAutoScaling
optional - TimeBasedAutoScaling -
VirtualizationType
optional - String -
Volumes
optional - 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.