Registry

Ensures that the Google Cloud Storage bucket that backs Google Container Registry exists. Creating this resource will create the backing bucket if it does not exist, or do nothing if the bucket already exists. Destroying this resource does NOT destroy the backing bucket. For more information see the official documentation

This resource can be used to ensure that the GCS bucket exists prior to assigning permissions. For more information see the access control page for GCR.

Example Usage

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
    public MyStack()
    {
        var registry = new Gcp.Container.Registry("registry", new Gcp.Container.RegistryArgs
        {
            Location = "EU",
            Project = "my-project",
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v5/go/gcp/container"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := container.NewRegistry(ctx, "registry", &container.RegistryArgs{
			Location: pulumi.String("EU"),
			Project:  pulumi.String("my-project"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_gcp as gcp

registry = gcp.container.Registry("registry",
    location="EU",
    project="my-project")
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const registry = new gcp.container.Registry("registry", {
    location: "EU",
    project: "my-project",
});

Create a Registry Resource

new Registry(name: string, args?: RegistryArgs, opts?: CustomResourceOptions);
@overload
def Registry(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             location: Optional[str] = None,
             project: Optional[str] = None)
@overload
def Registry(resource_name: str,
             args: Optional[RegistryArgs] = None,
             opts: Optional[ResourceOptions] = None)
func NewRegistry(ctx *Context, name string, args *RegistryArgs, opts ...ResourceOption) (*Registry, error)
public Registry(string name, RegistryArgs? args = null, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args RegistryArgs
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 RegistryArgs
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 RegistryArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args RegistryArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

Registry Resource Properties

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

Inputs

The Registry resource accepts the following input properties:

Location string
The location of the registry. One of ASIA, EU, US or not specified. See the official documentation for more information on registry locations.
Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
Location string
The location of the registry. One of ASIA, EU, US or not specified. See the official documentation for more information on registry locations.
Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
location string
The location of the registry. One of ASIA, EU, US or not specified. See the official documentation for more information on registry locations.
project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
location str
The location of the registry. One of ASIA, EU, US or not specified. See the official documentation for more information on registry locations.
project str
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Outputs

All input properties are implicitly available as output properties. Additionally, the Registry resource produces the following output properties:

BucketSelfLink string
The URI of the created resource.
Id string
The provider-assigned unique ID for this managed resource.
BucketSelfLink string
The URI of the created resource.
Id string
The provider-assigned unique ID for this managed resource.
bucketSelfLink string
The URI of the created resource.
id string
The provider-assigned unique ID for this managed resource.
bucket_self_link str
The URI of the created resource.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing Registry Resource

Get an existing Registry 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?: RegistryState, opts?: CustomResourceOptions): Registry
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        bucket_self_link: Optional[str] = None,
        location: Optional[str] = None,
        project: Optional[str] = None) -> Registry
func GetRegistry(ctx *Context, name string, id IDInput, state *RegistryState, opts ...ResourceOption) (*Registry, error)
public static Registry Get(string name, Input<string> id, RegistryState? 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:

BucketSelfLink string
The URI of the created resource.
Location string
The location of the registry. One of ASIA, EU, US or not specified. See the official documentation for more information on registry locations.
Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
BucketSelfLink string
The URI of the created resource.
Location string
The location of the registry. One of ASIA, EU, US or not specified. See the official documentation for more information on registry locations.
Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
bucketSelfLink string
The URI of the created resource.
location string
The location of the registry. One of ASIA, EU, US or not specified. See the official documentation for more information on registry locations.
project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
bucket_self_link str
The URI of the created resource.
location str
The location of the registry. One of ASIA, EU, US or not specified. See the official documentation for more information on registry locations.
project str
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Import

This resource does not support import.

Package Details

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