1. Packages
  2. Yandex
  3. API Docs
  4. ResourcemanagerFolderIamMember
Yandex v0.13.0 published on Tuesday, Feb 22, 2022 by Pulumi

yandex.ResourcemanagerFolderIamMember

Explore with Pulumi AI

yandex logo
Yandex v0.13.0 published on Tuesday, Feb 22, 2022 by Pulumi

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

    Note: This resource must not be used in conjunction with yandex.ResourcemanagerFolderIamPolicy or they will conflict over what your policy should be. Similarly, roles controlled by yandex.ResourcemanagerFolderIamBinding should not be assigned using yandex.ResourcemanagerFolderIamMember.

    Example Usage

    using Pulumi;
    using Yandex = Pulumi.Yandex;
    
    class MyStack : Stack
    {
        public MyStack()
        {
            var department1 = Output.Create(Yandex.GetResourcemanagerFolder.InvokeAsync(new Yandex.GetResourcemanagerFolderArgs
            {
                FolderId = "some_folder_id",
            }));
            var admin = new Yandex.ResourcemanagerFolderIamMember("admin", new Yandex.ResourcemanagerFolderIamMemberArgs
            {
                FolderId = data.Yandex_resourcemanager.Department1.Name,
                Member = "userAccount: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 := "some_folder_id"
    		_, err := yandex.LookupResourcemanagerFolder(ctx, &GetResourcemanagerFolderArgs{
    			FolderId: &opt0,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = yandex.NewResourcemanagerFolderIamMember(ctx, "admin", &yandex.ResourcemanagerFolderIamMemberArgs{
    			FolderId: pulumi.Any(data.Yandex_resourcemanager.Department1.Name),
    			Member:   pulumi.String("userAccount:user_id"),
    			Role:     pulumi.String("editor"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Coming soon!

    import pulumi
    import pulumi_yandex as yandex
    
    department1 = yandex.get_resourcemanager_folder(folder_id="some_folder_id")
    admin = yandex.ResourcemanagerFolderIamMember("admin",
        folder_id=data["yandex_resourcemanager"]["department1"]["name"],
        member="userAccount:user_id",
        role="editor")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as yandex from "@pulumi/yandex";
    
    const department1 = pulumi.output(yandex.getResourcemanagerFolder({
        folderId: "some_folder_id",
    }));
    const admin = new yandex.ResourcemanagerFolderIamMember("admin", {
        folderId: yandex_resourcemanager_department1.name,
        member: "userAccount:user_id",
        role: "editor",
    });
    

    Coming soon!

    Create ResourcemanagerFolderIamMember Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

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

    Parameters

    name string
    The unique name of the resource.
    args ResourcemanagerFolderIamMemberArgs
    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 ResourcemanagerFolderIamMemberArgs
    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 ResourcemanagerFolderIamMemberArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ResourcemanagerFolderIamMemberArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ResourcemanagerFolderIamMemberArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var resourcemanagerFolderIamMemberResource = new Yandex.ResourcemanagerFolderIamMember("resourcemanagerFolderIamMemberResource", new()
    {
        FolderId = "string",
        Member = "string",
        Role = "string",
        SleepAfter = 0,
    });
    
    example, err := yandex.NewResourcemanagerFolderIamMember(ctx, "resourcemanagerFolderIamMemberResource", &yandex.ResourcemanagerFolderIamMemberArgs{
    	FolderId:   pulumi.String("string"),
    	Member:     pulumi.String("string"),
    	Role:       pulumi.String("string"),
    	SleepAfter: pulumi.Int(0),
    })
    
    var resourcemanagerFolderIamMemberResource = new ResourcemanagerFolderIamMember("resourcemanagerFolderIamMemberResource", ResourcemanagerFolderIamMemberArgs.builder()
        .folderId("string")
        .member("string")
        .role("string")
        .sleepAfter(0)
        .build());
    
    resourcemanager_folder_iam_member_resource = yandex.ResourcemanagerFolderIamMember("resourcemanagerFolderIamMemberResource",
        folder_id="string",
        member="string",
        role="string",
        sleep_after=0)
    
    const resourcemanagerFolderIamMemberResource = new yandex.ResourcemanagerFolderIamMember("resourcemanagerFolderIamMemberResource", {
        folderId: "string",
        member: "string",
        role: "string",
        sleepAfter: 0,
    });
    
    type: yandex:ResourcemanagerFolderIamMember
    properties:
        folderId: string
        member: string
        role: string
        sleepAfter: 0
    

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

    FolderId string
    ID of the folder to attach a policy to.
    Member string
    The identity that will be granted the privilege that is specified in the role field. This field 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.
    Role string
    The role that should be assigned.
    SleepAfter int
    FolderId string
    ID of the folder to attach a policy to.
    Member string
    The identity that will be granted the privilege that is specified in the role field. This field 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.
    Role string
    The role that should be assigned.
    SleepAfter int
    folderId String
    ID of the folder to attach a policy to.
    member String
    The identity that will be granted the privilege that is specified in the role field. This field 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.
    role String
    The role that should be assigned.
    sleepAfter Integer
    folderId string
    ID of the folder to attach a policy to.
    member string
    The identity that will be granted the privilege that is specified in the role field. This field 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.
    role string
    The role that should be assigned.
    sleepAfter number
    folder_id str
    ID of the folder to attach a policy to.
    member str
    The identity that will be granted the privilege that is specified in the role field. This field 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.
    role str
    The role that should be assigned.
    sleep_after int
    folderId String
    ID of the folder to attach a policy to.
    member String
    The identity that will be granted the privilege that is specified in the role field. This field 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.
    role String
    The role that should be assigned.
    sleepAfter Number

    Outputs

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

    Get an existing ResourcemanagerFolderIamMember 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?: ResourcemanagerFolderIamMemberState, opts?: CustomResourceOptions): ResourcemanagerFolderIamMember
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            folder_id: Optional[str] = None,
            member: Optional[str] = None,
            role: Optional[str] = None,
            sleep_after: Optional[int] = None) -> ResourcemanagerFolderIamMember
    func GetResourcemanagerFolderIamMember(ctx *Context, name string, id IDInput, state *ResourcemanagerFolderIamMemberState, opts ...ResourceOption) (*ResourcemanagerFolderIamMember, error)
    public static ResourcemanagerFolderIamMember Get(string name, Input<string> id, ResourcemanagerFolderIamMemberState? state, CustomResourceOptions? opts = null)
    public static ResourcemanagerFolderIamMember get(String name, Output<String> id, ResourcemanagerFolderIamMemberState 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:
    FolderId string
    ID of the folder to attach a policy to.
    Member string
    The identity that will be granted the privilege that is specified in the role field. This field 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.
    Role string
    The role that should be assigned.
    SleepAfter int
    FolderId string
    ID of the folder to attach a policy to.
    Member string
    The identity that will be granted the privilege that is specified in the role field. This field 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.
    Role string
    The role that should be assigned.
    SleepAfter int
    folderId String
    ID of the folder to attach a policy to.
    member String
    The identity that will be granted the privilege that is specified in the role field. This field 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.
    role String
    The role that should be assigned.
    sleepAfter Integer
    folderId string
    ID of the folder to attach a policy to.
    member string
    The identity that will be granted the privilege that is specified in the role field. This field 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.
    role string
    The role that should be assigned.
    sleepAfter number
    folder_id str
    ID of the folder to attach a policy to.
    member str
    The identity that will be granted the privilege that is specified in the role field. This field 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.
    role str
    The role that should be assigned.
    sleep_after int
    folderId String
    ID of the folder to attach a policy to.
    member String
    The identity that will be granted the privilege that is specified in the role field. This field 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.
    role String
    The role that should be assigned.
    sleepAfter Number

    Import

    IAM member imports use space-delimited identifiers; the resource in question, the role, and the account. This member resource can be imported using the folder id, role, and account, e.g.

     $ pulumi import yandex:index/resourcemanagerFolderIamMember:ResourcemanagerFolderIamMember my_project "folder_id viewer foo@example.com"
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Yandex pulumi/pulumi-yandex
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the yandex Terraform Provider.
    yandex logo
    Yandex v0.13.0 published on Tuesday, Feb 22, 2022 by Pulumi