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

Yandex

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

ContainerRegistryIamBinding

yandex_container_registry_iam_binding

Allows creation and management of a single binding within IAM policy for an existing Yandex Container Registry.

Example Usage

using Pulumi;
using Yandex = Pulumi.Yandex;

class MyStack : Stack
{
    public MyStack()
    {
        var your_registry = new Yandex.ContainerRegistry("your-registry", new Yandex.ContainerRegistryArgs
        {
            FolderId = "your-folder-id",
        });
        var puller = new Yandex.ContainerRegistryIamBinding("puller", new Yandex.ContainerRegistryIamBindingArgs
        {
            RegistryId = your_registry.Id,
            Role = "container-registry.images.puller",
            Members = 
            {
                "system:allUsers",
            },
        });
    }

}
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.NewContainerRegistry(ctx, "your_registry", &yandex.ContainerRegistryArgs{
			FolderId: pulumi.String("your-folder-id"),
		})
		if err != nil {
			return err
		}
		_, err = yandex.NewContainerRegistryIamBinding(ctx, "puller", &yandex.ContainerRegistryIamBindingArgs{
			RegistryId: your_registry.ID(),
			Role:       pulumi.String("container-registry.images.puller"),
			Members: pulumi.StringArray{
				pulumi.String("system:allUsers"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_yandex as yandex

your_registry = yandex.ContainerRegistry("your-registry", folder_id="your-folder-id")
puller = yandex.ContainerRegistryIamBinding("puller",
    registry_id=your_registry.id,
    role="container-registry.images.puller",
    members=["system:allUsers"])
import * as pulumi from "@pulumi/pulumi";
import * as yandex from "@pulumi/yandex";

const your_registry = new yandex.ContainerRegistry("your-registry", {folderId: "your-folder-id"});
const puller = new yandex.ContainerRegistryIamBinding("puller", {
    registryId: your_registry.id,
    role: "container-registry.images.puller",
    members: ["system:allUsers"],
});

Create a ContainerRegistryIamBinding Resource

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

ContainerRegistryIamBinding 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 ContainerRegistryIamBinding 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
RegistryId string
The Yandex Container Registry ID to apply a binding to.
Role string
The role that should be applied. See roles.
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
RegistryId string
The Yandex Container Registry ID to apply a binding to.
Role string
The role that should be applied. See roles.
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
registryId string
The Yandex Container Registry ID to apply a binding to.
role string
The role that should be applied. See roles.
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
registry_id str
The Yandex Container Registry ID to apply a binding to.
role str
The role that should be applied. See roles.
sleep_after int

Outputs

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

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

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
RegistryId string
The Yandex Container Registry ID to apply a binding to.
Role string
The role that should be applied. See roles.
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
RegistryId string
The Yandex Container Registry ID to apply a binding to.
Role string
The role that should be applied. See roles.
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
registryId string
The Yandex Container Registry ID to apply a binding to.
role string
The role that should be applied. See roles.
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
registry_id str
The Yandex Container Registry ID to apply a binding to.
role str
The role that should be applied. See roles.
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 registry_id and role, e.g.

 $ pulumi import yandex:index/containerRegistryIamBinding:ContainerRegistryIamBinding puller "registry_id container-registry.images.puller"

Package Details

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