Yandex

Pulumi Official
Package maintained by Pulumi
v0.13.0 published on Tuesday, Feb 22, 2022 by Pulumi

KmsSymmetricKeyIamBinding

yandex_kms_symmetric_key_iam_binding

Allows creation and management of a single binding within IAM policy for an existing Yandex KMS Symmetric Key.

Example Usage

using Pulumi;
using Yandex = Pulumi.Yandex;

class MyStack : Stack
{
    public MyStack()
    {
        var your_key = new Yandex.KmsSymmetricKey("your-key", new Yandex.KmsSymmetricKeyArgs
        {
            FolderId = "your-folder-id",
        });
        var viewer = new Yandex.KmsSymmetricKeyIamBinding("viewer", new Yandex.KmsSymmetricKeyIamBindingArgs
        {
            SymmetricKeyId = your_key.Id,
            Role = "viewer",
            Members = 
            {
                "userAccount:foo_user_id",
            },
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-yandex/sdk/go/yandex"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := yandex.NewKmsSymmetricKey(ctx, "your-key", &yandex.KmsSymmetricKeyArgs{
			FolderId: pulumi.String("your-folder-id"),
		})
		if err != nil {
			return err
		}
		_, err = yandex.NewKmsSymmetricKeyIamBinding(ctx, "viewer", &yandex.KmsSymmetricKeyIamBindingArgs{
			SymmetricKeyId: your_key.ID(),
			Role:           pulumi.String("viewer"),
			Members: pulumi.StringArray{
				pulumi.String("userAccount:foo_user_id"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_yandex as yandex

your_key = yandex.KmsSymmetricKey("your-key", folder_id="your-folder-id")
viewer = yandex.KmsSymmetricKeyIamBinding("viewer",
    symmetric_key_id=your_key.id,
    role="viewer",
    members=["userAccount:foo_user_id"])
import * as pulumi from "@pulumi/pulumi";
import * as yandex from "@pulumi/yandex";

const your_key = new yandex.KmsSymmetricKey("your-key", {folderId: "your-folder-id"});
const viewer = new yandex.KmsSymmetricKeyIamBinding("viewer", {
    symmetricKeyId: your_key.id,
    role: "viewer",
    members: ["userAccount:foo_user_id"],
});

Coming soon!

Create a KmsSymmetricKeyIamBinding Resource

new KmsSymmetricKeyIamBinding(name: string, args: KmsSymmetricKeyIamBindingArgs, opts?: CustomResourceOptions);
@overload
def KmsSymmetricKeyIamBinding(resource_name: str,
                              opts: Optional[ResourceOptions] = None,
                              members: Optional[Sequence[str]] = None,
                              role: Optional[str] = None,
                              sleep_after: Optional[int] = None,
                              symmetric_key_id: Optional[str] = None)
@overload
def KmsSymmetricKeyIamBinding(resource_name: str,
                              args: KmsSymmetricKeyIamBindingArgs,
                              opts: Optional[ResourceOptions] = None)
func NewKmsSymmetricKeyIamBinding(ctx *Context, name string, args KmsSymmetricKeyIamBindingArgs, opts ...ResourceOption) (*KmsSymmetricKeyIamBinding, error)
public KmsSymmetricKeyIamBinding(string name, KmsSymmetricKeyIamBindingArgs args, CustomResourceOptions? opts = null)
public KmsSymmetricKeyIamBinding(String name, KmsSymmetricKeyIamBindingArgs args)
public KmsSymmetricKeyIamBinding(String name, KmsSymmetricKeyIamBindingArgs args, CustomResourceOptions options)
type: yandex:KmsSymmetricKeyIamBinding
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args KmsSymmetricKeyIamBindingArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args KmsSymmetricKeyIamBindingArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args KmsSymmetricKeyIamBindingArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args KmsSymmetricKeyIamBindingArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args KmsSymmetricKeyIamBindingArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

KmsSymmetricKeyIamBinding Resource Properties

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

Inputs

The KmsSymmetricKeyIamBinding resource accepts the following input properties:

Members List<string>

Identities that will be granted the privilege in role. Each entry can have one of the following values:

  • userAccount:{user_id}: A unique user ID that represents a specific Yandex account.
  • serviceAccount:{service_account_id}: A unique service account ID.
  • system:{allUsers|allAuthenticatedUsers}: see system groups
Role string

The role that should be applied. See roles.

SymmetricKeyId string

The Yandex Key Management Service Symmetric Key ID to apply a binding to.

SleepAfter int
Members []string

Identities that will be granted the privilege in role. Each entry can have one of the following values:

  • userAccount:{user_id}: A unique user ID that represents a specific Yandex account.
  • serviceAccount:{service_account_id}: A unique service account ID.
  • system:{allUsers|allAuthenticatedUsers}: see system groups
Role string

The role that should be applied. See roles.

SymmetricKeyId string

The Yandex Key Management Service Symmetric Key ID to apply a binding to.

SleepAfter int
members List

Identities that will be granted the privilege in role. Each entry can have one of the following values:

  • userAccount:{user_id}: A unique user ID that represents a specific Yandex account.
  • serviceAccount:{service_account_id}: A unique service account ID.
  • system:{allUsers|allAuthenticatedUsers}: see system groups
role String

The role that should be applied. See roles.

symmetricKeyId String

The Yandex Key Management Service Symmetric Key ID to apply a binding to.

sleepAfter Integer
members string[]

Identities that will be granted the privilege in role. Each entry can have one of the following values:

  • userAccount:{user_id}: A unique user ID that represents a specific Yandex account.
  • serviceAccount:{service_account_id}: A unique service account ID.
  • system:{allUsers|allAuthenticatedUsers}: see system groups
role string

The role that should be applied. See roles.

symmetricKeyId string

The Yandex Key Management Service Symmetric Key ID to apply a binding to.

sleepAfter number
members Sequence[str]

Identities that will be granted the privilege in role. Each entry can have one of the following values:

  • userAccount:{user_id}: A unique user ID that represents a specific Yandex account.
  • serviceAccount:{service_account_id}: A unique service account ID.
  • system:{allUsers|allAuthenticatedUsers}: see system groups
role str

The role that should be applied. See roles.

symmetric_key_id str

The Yandex Key Management Service Symmetric Key ID to apply a binding to.

sleep_after int
members List

Identities that will be granted the privilege in role. Each entry can have one of the following values:

  • userAccount:{user_id}: A unique user ID that represents a specific Yandex account.
  • serviceAccount:{service_account_id}: A unique service account ID.
  • system:{allUsers|allAuthenticatedUsers}: see system groups
role String

The role that should be applied. See roles.

symmetricKeyId String

The Yandex Key Management Service Symmetric Key ID to apply a binding to.

sleepAfter Number

Outputs

All input properties are implicitly available as output properties. Additionally, the KmsSymmetricKeyIamBinding 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 string

The provider-assigned unique ID for this managed resource.

id str

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

Look up an Existing KmsSymmetricKeyIamBinding Resource

Get an existing KmsSymmetricKeyIamBinding 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?: KmsSymmetricKeyIamBindingState, opts?: CustomResourceOptions): KmsSymmetricKeyIamBinding
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        members: Optional[Sequence[str]] = None,
        role: Optional[str] = None,
        sleep_after: Optional[int] = None,
        symmetric_key_id: Optional[str] = None) -> KmsSymmetricKeyIamBinding
func GetKmsSymmetricKeyIamBinding(ctx *Context, name string, id IDInput, state *KmsSymmetricKeyIamBindingState, opts ...ResourceOption) (*KmsSymmetricKeyIamBinding, error)
public static KmsSymmetricKeyIamBinding Get(string name, Input<string> id, KmsSymmetricKeyIamBindingState? state, CustomResourceOptions? opts = null)
public static KmsSymmetricKeyIamBinding get(String name, Output<String> id, KmsSymmetricKeyIamBindingState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
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.
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:
Members List<string>

Identities that will be granted the privilege in role. Each entry can have one of the following values:

  • userAccount:{user_id}: A unique user ID that represents a specific Yandex account.
  • serviceAccount:{service_account_id}: A unique service account ID.
  • system:{allUsers|allAuthenticatedUsers}: see system groups
Role string

The role that should be applied. See roles.

SleepAfter int
SymmetricKeyId string

The Yandex Key Management Service Symmetric Key ID to apply a binding to.

Members []string

Identities that will be granted the privilege in role. Each entry can have one of the following values:

  • userAccount:{user_id}: A unique user ID that represents a specific Yandex account.
  • serviceAccount:{service_account_id}: A unique service account ID.
  • system:{allUsers|allAuthenticatedUsers}: see system groups
Role string

The role that should be applied. See roles.

SleepAfter int
SymmetricKeyId string

The Yandex Key Management Service Symmetric Key ID to apply a binding to.

members List

Identities that will be granted the privilege in role. Each entry can have one of the following values:

  • userAccount:{user_id}: A unique user ID that represents a specific Yandex account.
  • serviceAccount:{service_account_id}: A unique service account ID.
  • system:{allUsers|allAuthenticatedUsers}: see system groups
role String

The role that should be applied. See roles.

sleepAfter Integer
symmetricKeyId String

The Yandex Key Management Service Symmetric Key ID to apply a binding to.

members string[]

Identities that will be granted the privilege in role. Each entry can have one of the following values:

  • userAccount:{user_id}: A unique user ID that represents a specific Yandex account.
  • serviceAccount:{service_account_id}: A unique service account ID.
  • system:{allUsers|allAuthenticatedUsers}: see system groups
role string

The role that should be applied. See roles.

sleepAfter number
symmetricKeyId string

The Yandex Key Management Service Symmetric Key ID to apply a binding to.

members Sequence[str]

Identities that will be granted the privilege in role. Each entry can have one of the following values:

  • userAccount:{user_id}: A unique user ID that represents a specific Yandex account.
  • serviceAccount:{service_account_id}: A unique service account ID.
  • system:{allUsers|allAuthenticatedUsers}: see system groups
role str

The role that should be applied. See roles.

sleep_after int
symmetric_key_id str

The Yandex Key Management Service Symmetric Key ID to apply a binding to.

members List

Identities that will be granted the privilege in role. Each entry can have one of the following values:

  • userAccount:{user_id}: A unique user ID that represents a specific Yandex account.
  • serviceAccount:{service_account_id}: A unique service account ID.
  • system:{allUsers|allAuthenticatedUsers}: see system groups
role String

The role that should be applied. See roles.

sleepAfter Number
symmetricKeyId String

The Yandex Key Management Service Symmetric Key ID to apply a binding to.

Import

IAM binding imports use space-delimited identifiers; first the resource in question and then the role. These bindings can be imported using the symmetric_key_id and role, e.g.

 $ pulumi import yandex:index/kmsSymmetricKeyIamBinding:KmsSymmetricKeyIamBinding viewer "symmetric_key_id viewer"

Package Details

Repository
https://github.com/pulumi/pulumi-yandex
License
Apache-2.0
Notes

This Pulumi package is based on the yandex Terraform Provider.