Welcome to Pulumi Registry, your window into the cloud. Read the announcement.

Yandex

v0.10.0 published on Thursday, Nov 18, 2021 by Pulumi

ResourcemanagerCloudIamBinding

Allows creation and management of a single binding within IAM policy for an existing Yandex Resource Manager cloud.

Example Usage

using Pulumi;
using Yandex = Pulumi.Yandex;

class MyStack : Stack
{
    public MyStack()
    {
        var project1 = Output.Create(Yandex.GetResourcemanagerCloud.InvokeAsync(new Yandex.GetResourcemanagerCloudArgs
        {
            Name = "Project 1",
        }));
        var admin = new Yandex.ResourcemanagerCloudIamBinding("admin", new Yandex.ResourcemanagerCloudIamBindingArgs
        {
            CloudId = project1.Apply(project1 => project1.Id),
            Members = 
            {
                "userAccount:some_user_id",
            },
            Role = "editor",
        });
    }

}
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 {
		opt0 := "Project 1"
		project1, err := yandex.GetResourcemanagerCloud(ctx, &GetResourcemanagerCloudArgs{
			Name: &opt0,
		}, nil)
		if err != nil {
			return err
		}
		_, err = yandex.NewResourcemanagerCloudIamBinding(ctx, "admin", &yandex.ResourcemanagerCloudIamBindingArgs{
			CloudId: pulumi.String(project1.Id),
			Members: pulumi.StringArray{
				pulumi.String("userAccount:some_user_id"),
			},
			Role: pulumi.String("editor"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_yandex as yandex

project1 = yandex.get_resourcemanager_cloud(name="Project 1")
admin = yandex.ResourcemanagerCloudIamBinding("admin",
    cloud_id=project1.id,
    members=["userAccount:some_user_id"],
    role="editor")
import * as pulumi from "@pulumi/pulumi";
import * as yandex from "@pulumi/yandex";

const project1 = pulumi.output(yandex.getResourcemanagerCloud({
    name: "Project 1",
}));
const admin = new yandex.ResourcemanagerCloudIamBinding("admin", {
    cloudId: project1.id,
    members: ["userAccount:some_user_id"],
    role: "editor",
});

Create a ResourcemanagerCloudIamBinding Resource

new ResourcemanagerCloudIamBinding(name: string, args: ResourcemanagerCloudIamBindingArgs, opts?: CustomResourceOptions);
@overload
def ResourcemanagerCloudIamBinding(resource_name: str,
                                   opts: Optional[ResourceOptions] = None,
                                   cloud_id: Optional[str] = None,
                                   members: Optional[Sequence[str]] = None,
                                   role: Optional[str] = None,
                                   sleep_after: Optional[int] = None)
@overload
def ResourcemanagerCloudIamBinding(resource_name: str,
                                   args: ResourcemanagerCloudIamBindingArgs,
                                   opts: Optional[ResourceOptions] = None)
func NewResourcemanagerCloudIamBinding(ctx *Context, name string, args ResourcemanagerCloudIamBindingArgs, opts ...ResourceOption) (*ResourcemanagerCloudIamBinding, error)
public ResourcemanagerCloudIamBinding(string name, ResourcemanagerCloudIamBindingArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args ResourcemanagerCloudIamBindingArgs
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 ResourcemanagerCloudIamBindingArgs
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 ResourcemanagerCloudIamBindingArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ResourcemanagerCloudIamBindingArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

ResourcemanagerCloudIamBinding 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 ResourcemanagerCloudIamBinding resource accepts the following input properties:

CloudId string
ID of the cloud to attach the policy to.
Members List<string>

An array of identities that will be granted the privilege in the 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.
  • federatedUser:{federated_user_id}: A unique federated user ID.
Role string
The role that should be assigned. Only one yandex.ResourcemanagerCloudIamBinding can be used per role.
SleepAfter int
CloudId string
ID of the cloud to attach the policy to.
Members []string

An array of identities that will be granted the privilege in the 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.
  • federatedUser:{federated_user_id}: A unique federated user ID.
Role string
The role that should be assigned. Only one yandex.ResourcemanagerCloudIamBinding can be used per role.
SleepAfter int
cloudId string
ID of the cloud to attach the policy to.
members string[]

An array of identities that will be granted the privilege in the 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.
  • federatedUser:{federated_user_id}: A unique federated user ID.
role string
The role that should be assigned. Only one yandex.ResourcemanagerCloudIamBinding can be used per role.
sleepAfter number
cloud_id str
ID of the cloud to attach the policy to.
members Sequence[str]

An array of identities that will be granted the privilege in the 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.
  • federatedUser:{federated_user_id}: A unique federated user ID.
role str
The role that should be assigned. Only one yandex.ResourcemanagerCloudIamBinding can be used per role.
sleep_after int

Outputs

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

Get an existing ResourcemanagerCloudIamBinding 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?: ResourcemanagerCloudIamBindingState, opts?: CustomResourceOptions): ResourcemanagerCloudIamBinding
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        cloud_id: Optional[str] = None,
        members: Optional[Sequence[str]] = None,
        role: Optional[str] = None,
        sleep_after: Optional[int] = None) -> ResourcemanagerCloudIamBinding
func GetResourcemanagerCloudIamBinding(ctx *Context, name string, id IDInput, state *ResourcemanagerCloudIamBindingState, opts ...ResourceOption) (*ResourcemanagerCloudIamBinding, error)
public static ResourcemanagerCloudIamBinding Get(string name, Input<string> id, ResourcemanagerCloudIamBindingState? 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:

CloudId string
ID of the cloud to attach the policy to.
Members List<string>

An array of identities that will be granted the privilege in the 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.
  • federatedUser:{federated_user_id}: A unique federated user ID.
Role string
The role that should be assigned. Only one yandex.ResourcemanagerCloudIamBinding can be used per role.
SleepAfter int
CloudId string
ID of the cloud to attach the policy to.
Members []string

An array of identities that will be granted the privilege in the 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.
  • federatedUser:{federated_user_id}: A unique federated user ID.
Role string
The role that should be assigned. Only one yandex.ResourcemanagerCloudIamBinding can be used per role.
SleepAfter int
cloudId string
ID of the cloud to attach the policy to.
members string[]

An array of identities that will be granted the privilege in the 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.
  • federatedUser:{federated_user_id}: A unique federated user ID.
role string
The role that should be assigned. Only one yandex.ResourcemanagerCloudIamBinding can be used per role.
sleepAfter number
cloud_id str
ID of the cloud to attach the policy to.
members Sequence[str]

An array of identities that will be granted the privilege in the 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.
  • federatedUser:{federated_user_id}: A unique federated user ID.
role str
The role that should be assigned. Only one yandex.ResourcemanagerCloudIamBinding can be used per role.
sleep_after int

Import

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

 $ pulumi import yandex:index/resourcemanagerCloudIamBinding:ResourcemanagerCloudIamBinding viewer "cloud_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.