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

yandex.ContainerRegistryIamBinding

Explore with Pulumi AI

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",
            },
        });
    }

}
Copy
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
	})
}
Copy

Coming soon!

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"],
});
Copy
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"])
Copy

Coming soon!

Create ContainerRegistryIamBinding Resource

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

Constructor syntax

new ContainerRegistryIamBinding(name: string, args: ContainerRegistryIamBindingArgs, opts?: CustomResourceOptions);
@overload
def ContainerRegistryIamBinding(resource_name: str,
                                args: ContainerRegistryIamBindingArgs,
                                opts: Optional[ResourceOptions] = None)

@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)
func NewContainerRegistryIamBinding(ctx *Context, name string, args ContainerRegistryIamBindingArgs, opts ...ResourceOption) (*ContainerRegistryIamBinding, error)
public ContainerRegistryIamBinding(string name, ContainerRegistryIamBindingArgs args, CustomResourceOptions? opts = null)
public ContainerRegistryIamBinding(String name, ContainerRegistryIamBindingArgs args)
public ContainerRegistryIamBinding(String name, ContainerRegistryIamBindingArgs args, CustomResourceOptions options)
type: yandex:ContainerRegistryIamBinding
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ContainerRegistryIamBindingArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. 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 This property is required. string
The unique name of the resource.
args This property is required. ContainerRegistryIamBindingArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ContainerRegistryIamBindingArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ContainerRegistryIamBindingArgs
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 containerRegistryIamBindingResource = new Yandex.ContainerRegistryIamBinding("containerRegistryIamBindingResource", new()
{
    Members = new[]
    {
        "string",
    },
    RegistryId = "string",
    Role = "string",
    SleepAfter = 0,
});
Copy
example, err := yandex.NewContainerRegistryIamBinding(ctx, "containerRegistryIamBindingResource", &yandex.ContainerRegistryIamBindingArgs{
	Members: pulumi.StringArray{
		pulumi.String("string"),
	},
	RegistryId: pulumi.String("string"),
	Role:       pulumi.String("string"),
	SleepAfter: pulumi.Int(0),
})
Copy
var containerRegistryIamBindingResource = new ContainerRegistryIamBinding("containerRegistryIamBindingResource", ContainerRegistryIamBindingArgs.builder()
    .members("string")
    .registryId("string")
    .role("string")
    .sleepAfter(0)
    .build());
Copy
container_registry_iam_binding_resource = yandex.ContainerRegistryIamBinding("containerRegistryIamBindingResource",
    members=["string"],
    registry_id="string",
    role="string",
    sleep_after=0)
Copy
const containerRegistryIamBindingResource = new yandex.ContainerRegistryIamBinding("containerRegistryIamBindingResource", {
    members: ["string"],
    registryId: "string",
    role: "string",
    sleepAfter: 0,
});
Copy
type: yandex:ContainerRegistryIamBinding
properties:
    members:
        - string
    registryId: string
    role: string
    sleepAfter: 0
Copy

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

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The ContainerRegistryIamBinding resource accepts the following input properties:

Members This property is required. 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 This property is required. string
The Yandex Container Registry ID to apply a binding to.
Role This property is required. string
The role that should be applied. See roles.
SleepAfter int
Members This property is required. []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 This property is required. string
The Yandex Container Registry ID to apply a binding to.
Role This property is required. string
The role that should be applied. See roles.
SleepAfter int
members This property is required. 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 This property is required. String
The Yandex Container Registry ID to apply a binding to.
role This property is required. String
The role that should be applied. See roles.
sleepAfter Integer
members This property is required. 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 This property is required. string
The Yandex Container Registry ID to apply a binding to.
role This property is required. string
The role that should be applied. See roles.
sleepAfter number
members This property is required. 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 This property is required. str
The Yandex Container Registry ID to apply a binding to.
role This property is required. str
The role that should be applied. See roles.
sleep_after int
members This property is required. 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 This property is required. String
The Yandex Container Registry ID to apply a binding to.
role This property is required. String
The role that should be applied. See roles.
sleepAfter Number

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 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 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)
public static ContainerRegistryIamBinding get(String name, Output<String> id, ContainerRegistryIamBindingState state, CustomResourceOptions options)
resources:  _:    type: yandex:ContainerRegistryIamBinding    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 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 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
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
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 Number

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"
Copy

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.