Permission

Provides an OpsWorks permission resource.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var myStackPermission = new Aws.OpsWorks.Permission("myStackPermission", new Aws.OpsWorks.PermissionArgs
        {
            AllowSsh = true,
            AllowSudo = true,
            Level = "iam_only",
            StackId = aws_opsworks_stack.Stack.Id,
            UserArn = aws_iam_user.User.Arn,
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/opsworks"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := opsworks.NewPermission(ctx, "myStackPermission", &opsworks.PermissionArgs{
            AllowSsh:  pulumi.Bool(true),
            AllowSudo: pulumi.Bool(true),
            Level:     pulumi.String("iam_only"),
            StackId:   pulumi.String(aws_opsworks_stack.Stack.Id),
            UserArn:   pulumi.String(aws_iam_user.User.Arn),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

my_stack_permission = aws.opsworks.Permission("myStackPermission",
    allow_ssh=True,
    allow_sudo=True,
    level="iam_only",
    stack_id=aws_opsworks_stack["stack"]["id"],
    user_arn=aws_iam_user["user"]["arn"])
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const myStackPermission = new aws.opsworks.Permission("my_stack_permission", {
    allowSsh: true,
    allowSudo: true,
    level: "iam_only",
    stackId: aws_opsworks_stack_stack.id,
    userArn: aws_iam_user_user.arn,
});

Create a Permission Resource

def Permission(resource_name, opts=None, allow_ssh=None, allow_sudo=None, level=None, stack_id=None, user_arn=None, __props__=None);
func NewPermission(ctx *Context, name string, args PermissionArgs, opts ...ResourceOption) (*Permission, error)
public Permission(string name, PermissionArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args PermissionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args PermissionArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args PermissionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

Permission Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The Permission resource accepts the following input properties:

UserArn string

The user’s IAM ARN to set permissions for

AllowSsh bool

Whether the user is allowed to use SSH to communicate with the instance

AllowSudo bool

Whether the user is allowed to use sudo to elevate privileges

Level string

The users permission level. Mus be one of deny, show, deploy, manage, iam_only

StackId string

The stack to set the permissions for

UserArn string

The user’s IAM ARN to set permissions for

AllowSsh bool

Whether the user is allowed to use SSH to communicate with the instance

AllowSudo bool

Whether the user is allowed to use sudo to elevate privileges

Level string

The users permission level. Mus be one of deny, show, deploy, manage, iam_only

StackId string

The stack to set the permissions for

userArn string

The user’s IAM ARN to set permissions for

allowSsh boolean

Whether the user is allowed to use SSH to communicate with the instance

allowSudo boolean

Whether the user is allowed to use sudo to elevate privileges

level string

The users permission level. Mus be one of deny, show, deploy, manage, iam_only

stackId string

The stack to set the permissions for

user_arn str

The user’s IAM ARN to set permissions for

allow_ssh bool

Whether the user is allowed to use SSH to communicate with the instance

allow_sudo bool

Whether the user is allowed to use sudo to elevate privileges

level str

The users permission level. Mus be one of deny, show, deploy, manage, iam_only

stack_id str

The stack to set the permissions for

Outputs

All input properties are implicitly available as output properties. Additionally, the Permission resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing Permission Resource

Get an existing Permission resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: PermissionState, opts?: CustomResourceOptions): Permission
static get(resource_name, id, opts=None, allow_ssh=None, allow_sudo=None, level=None, stack_id=None, user_arn=None, __props__=None);
func GetPermission(ctx *Context, name string, id IDInput, state *PermissionState, opts ...ResourceOption) (*Permission, error)
public static Permission Get(string name, Input<string> id, PermissionState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

AllowSsh bool

Whether the user is allowed to use SSH to communicate with the instance

AllowSudo bool

Whether the user is allowed to use sudo to elevate privileges

Level string

The users permission level. Mus be one of deny, show, deploy, manage, iam_only

StackId string

The stack to set the permissions for

UserArn string

The user’s IAM ARN to set permissions for

AllowSsh bool

Whether the user is allowed to use SSH to communicate with the instance

AllowSudo bool

Whether the user is allowed to use sudo to elevate privileges

Level string

The users permission level. Mus be one of deny, show, deploy, manage, iam_only

StackId string

The stack to set the permissions for

UserArn string

The user’s IAM ARN to set permissions for

allowSsh boolean

Whether the user is allowed to use SSH to communicate with the instance

allowSudo boolean

Whether the user is allowed to use sudo to elevate privileges

level string

The users permission level. Mus be one of deny, show, deploy, manage, iam_only

stackId string

The stack to set the permissions for

userArn string

The user’s IAM ARN to set permissions for

allow_ssh bool

Whether the user is allowed to use SSH to communicate with the instance

allow_sudo bool

Whether the user is allowed to use sudo to elevate privileges

level str

The users permission level. Mus be one of deny, show, deploy, manage, iam_only

stack_id str

The stack to set the permissions for

user_arn str

The user’s IAM ARN to set permissions for

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.