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

opsworks_permission.tf#L4
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

main.tf#L7
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
opsworks_permission.tf#L4
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

main.tf#L1
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
}

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 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

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.