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
new Permission(name: string, args: PermissionArgs, opts?: CustomResourceOptions);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:
- User
Arn 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 string
The users permission level. Mus be one of
deny,show,deploy,manage,iam_only- Stack
Id string The stack to set the permissions for
- User
Arn 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 string
The users permission level. Mus be one of
deny,show,deploy,manage,iam_only- Stack
Id string The stack to set the permissions for
- user
Arn string The user’s IAM ARN to set permissions for
- allow
Ssh boolean Whether the user is allowed to use SSH to communicate with the instance
- allow
Sudo 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- stack
Id 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:
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): Permissionstatic 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:
- 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 string
The users permission level. Mus be one of
deny,show,deploy,manage,iam_only- Stack
Id string The stack to set the permissions for
- User
Arn 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 string
The users permission level. Mus be one of
deny,show,deploy,manage,iam_only- Stack
Id string The stack to set the permissions for
- User
Arn string The user’s IAM ARN to set permissions for
- allow
Ssh boolean Whether the user is allowed to use SSH to communicate with the instance
- allow
Sudo 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- stack
Id string The stack to set the permissions for
- user
Arn 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
awsTerraform Provider.