Module sourcerepo

This page documents the language specification for the gcp package. If you're looking for help working with the inputs, outputs, or functions of gcp resources in a Pulumi program, please see the resource documentation for examples and API reference.

Resources

Others

Resources

Resource Repository

class Repository extends CustomResource

A repository (or repo) is a Git repository storing versioned source content.

To get more information about Repository, see:

Example Usage - Sourcerepo Repository Basic

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const myRepo = new gcp.sourcerepo.Repository("my-repo", {});

Example Usage - Sourcerepo Repository Full

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const testAccount = new gcp.serviceAccount.Account("test-account", {
    accountId: "my-account",
    displayName: "Test Service Account",
});
const topic = new gcp.pubsub.Topic("topic", {});
const myRepo = new gcp.sourcerepo.Repository("my-repo", {pubsub_configs: [{
    topic: topic.id,
    messageFormat: "JSON",
    serviceAccountEmail: test_account.email,
}]});

constructor

new Repository(name: string, args?: RepositoryArgs, opts?: pulumi.CustomResourceOptions)

Create a Repository resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: RepositoryState, opts?: pulumi.CustomResourceOptions): Repository

Get an existing Repository resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is Repository

Returns true if the given object is an instance of Repository. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property name

public name: pulumi.Output<string>;

Resource name of the repository, of the form {{repo}}. The repo name may contain slashes. eg, name/with/slash

property project

public project: pulumi.Output<string>;

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

property pubsubConfigs

public pubsubConfigs: pulumi.Output<RepositoryPubsubConfig[] | undefined>;

How this repository publishes a change in the repository through Cloud Pub/Sub. Keyed by the topic names. Structure is documented below.

property size

public size: pulumi.Output<number>;

The disk usage of the repo, in bytes.

property url

public url: pulumi.Output<string>;

URL to clone the repository from Google Cloud Source Repositories.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource RepositoryIamBinding

class RepositoryIamBinding extends CustomResource

Three different resources help you manage your IAM policy for Cloud Pub/Sub Topic. Each of these resources serves a different use case:

  • gcp.pubsub.TopicIAMPolicy: Authoritative. Sets the IAM policy for the topic and replaces any existing policy already attached.
  • gcp.pubsub.TopicIAMBinding: Authoritative for a given role. Updates the IAM policy to grant a role to a list of members. Other roles within the IAM policy for the topic are preserved.
  • gcp.pubsub.TopicIAMMember: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the topic are preserved.

Note: gcp.pubsub.TopicIAMPolicy cannot be used in conjunction with gcp.pubsub.TopicIAMBinding and gcp.pubsub.TopicIAMMember or they will fight over what your policy should be.

Note: gcp.pubsub.TopicIAMBinding resources can be used in conjunction with gcp.pubsub.TopicIAMMember resources only if they do not grant privilege to the same role.

google_pubsub_topic_iam_policy

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const admin = gcp.organizations.getIAMPolicy({
    binding: [{
        role: "roles/viewer",
        members: ["user:jane@example.com"],
    }],
});
const policy = new gcp.pubsub.TopicIAMPolicy("policy", {
    project: google_pubsub_topic.example.project,
    topic: google_pubsub_topic.example.name,
    policyData: admin.then(admin => admin.policyData),
});

google_pubsub_topic_iam_binding

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const binding = new gcp.pubsub.TopicIAMBinding("binding", {
    project: google_pubsub_topic.example.project,
    topic: google_pubsub_topic.example.name,
    role: "roles/viewer",
    members: ["user:jane@example.com"],
});

google_pubsub_topic_iam_member

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const member = new gcp.pubsub.TopicIAMMember("member", {
    project: google_pubsub_topic.example.project,
    topic: google_pubsub_topic.example.name,
    role: "roles/viewer",
    member: "user:jane@example.com",
});

constructor

new RepositoryIamBinding(name: string, args: RepositoryIamBindingArgs, opts?: pulumi.CustomResourceOptions)

Create a RepositoryIamBinding resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: RepositoryIamBindingState, opts?: pulumi.CustomResourceOptions): RepositoryIamBinding

Get an existing RepositoryIamBinding resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is RepositoryIamBinding

Returns true if the given object is an instance of RepositoryIamBinding. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property condition

public condition: pulumi.Output<RepositoryIamBindingCondition | undefined>;

property etag

public etag: pulumi.Output<string>;

(Computed) The etag of the IAM policy.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property members

public members: pulumi.Output<string[]>;

property project

public project: pulumi.Output<string>;

The ID of the project in which the resource belongs. If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.

property repository

public repository: pulumi.Output<string>;

property role

public role: pulumi.Output<string>;

The role that should be applied. Only one gcp.pubsub.TopicIAMBinding can be used per role. Note that custom roles must be of the format [projects|organizations]/{parent-name}/roles/{role-name}.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource RepositoryIamMember

class RepositoryIamMember extends CustomResource

Three different resources help you manage your IAM policy for Cloud Pub/Sub Topic. Each of these resources serves a different use case:

  • gcp.pubsub.TopicIAMPolicy: Authoritative. Sets the IAM policy for the topic and replaces any existing policy already attached.
  • gcp.pubsub.TopicIAMBinding: Authoritative for a given role. Updates the IAM policy to grant a role to a list of members. Other roles within the IAM policy for the topic are preserved.
  • gcp.pubsub.TopicIAMMember: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the topic are preserved.

Note: gcp.pubsub.TopicIAMPolicy cannot be used in conjunction with gcp.pubsub.TopicIAMBinding and gcp.pubsub.TopicIAMMember or they will fight over what your policy should be.

Note: gcp.pubsub.TopicIAMBinding resources can be used in conjunction with gcp.pubsub.TopicIAMMember resources only if they do not grant privilege to the same role.

google_pubsub_topic_iam_policy

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const admin = gcp.organizations.getIAMPolicy({
    binding: [{
        role: "roles/viewer",
        members: ["user:jane@example.com"],
    }],
});
const policy = new gcp.pubsub.TopicIAMPolicy("policy", {
    project: google_pubsub_topic.example.project,
    topic: google_pubsub_topic.example.name,
    policyData: admin.then(admin => admin.policyData),
});

google_pubsub_topic_iam_binding

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const binding = new gcp.pubsub.TopicIAMBinding("binding", {
    project: google_pubsub_topic.example.project,
    topic: google_pubsub_topic.example.name,
    role: "roles/viewer",
    members: ["user:jane@example.com"],
});

google_pubsub_topic_iam_member

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const member = new gcp.pubsub.TopicIAMMember("member", {
    project: google_pubsub_topic.example.project,
    topic: google_pubsub_topic.example.name,
    role: "roles/viewer",
    member: "user:jane@example.com",
});

constructor

new RepositoryIamMember(name: string, args: RepositoryIamMemberArgs, opts?: pulumi.CustomResourceOptions)

Create a RepositoryIamMember resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: RepositoryIamMemberState, opts?: pulumi.CustomResourceOptions): RepositoryIamMember

Get an existing RepositoryIamMember resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is RepositoryIamMember

Returns true if the given object is an instance of RepositoryIamMember. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property condition

public condition: pulumi.Output<RepositoryIamMemberCondition | undefined>;

property etag

public etag: pulumi.Output<string>;

(Computed) The etag of the IAM policy.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property member

public member: pulumi.Output<string>;

property project

public project: pulumi.Output<string>;

The ID of the project in which the resource belongs. If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.

property repository

public repository: pulumi.Output<string>;

property role

public role: pulumi.Output<string>;

The role that should be applied. Only one gcp.pubsub.TopicIAMBinding can be used per role. Note that custom roles must be of the format [projects|organizations]/{parent-name}/roles/{role-name}.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource RepositoryIamPolicy

class RepositoryIamPolicy extends CustomResource

Three different resources help you manage your IAM policy for Cloud Pub/Sub Topic. Each of these resources serves a different use case:

  • gcp.pubsub.TopicIAMPolicy: Authoritative. Sets the IAM policy for the topic and replaces any existing policy already attached.
  • gcp.pubsub.TopicIAMBinding: Authoritative for a given role. Updates the IAM policy to grant a role to a list of members. Other roles within the IAM policy for the topic are preserved.
  • gcp.pubsub.TopicIAMMember: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the topic are preserved.

Note: gcp.pubsub.TopicIAMPolicy cannot be used in conjunction with gcp.pubsub.TopicIAMBinding and gcp.pubsub.TopicIAMMember or they will fight over what your policy should be.

Note: gcp.pubsub.TopicIAMBinding resources can be used in conjunction with gcp.pubsub.TopicIAMMember resources only if they do not grant privilege to the same role.

google_pubsub_topic_iam_policy

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const admin = gcp.organizations.getIAMPolicy({
    binding: [{
        role: "roles/viewer",
        members: ["user:jane@example.com"],
    }],
});
const policy = new gcp.pubsub.TopicIAMPolicy("policy", {
    project: google_pubsub_topic.example.project,
    topic: google_pubsub_topic.example.name,
    policyData: admin.then(admin => admin.policyData),
});

google_pubsub_topic_iam_binding

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const binding = new gcp.pubsub.TopicIAMBinding("binding", {
    project: google_pubsub_topic.example.project,
    topic: google_pubsub_topic.example.name,
    role: "roles/viewer",
    members: ["user:jane@example.com"],
});

google_pubsub_topic_iam_member

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const member = new gcp.pubsub.TopicIAMMember("member", {
    project: google_pubsub_topic.example.project,
    topic: google_pubsub_topic.example.name,
    role: "roles/viewer",
    member: "user:jane@example.com",
});

constructor

new RepositoryIamPolicy(name: string, args: RepositoryIamPolicyArgs, opts?: pulumi.CustomResourceOptions)

Create a RepositoryIamPolicy resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: RepositoryIamPolicyState, opts?: pulumi.CustomResourceOptions): RepositoryIamPolicy

Get an existing RepositoryIamPolicy resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is RepositoryIamPolicy

Returns true if the given object is an instance of RepositoryIamPolicy. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property etag

public etag: pulumi.Output<string>;

(Computed) The etag of the IAM policy.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property policyData

public policyData: pulumi.Output<string>;

The policy data generated by a gcp.organizations.getIAMPolicy data source.

property project

public project: pulumi.Output<string>;

The ID of the project in which the resource belongs. If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.

property repository

public repository: pulumi.Output<string>;

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Others

interface RepositoryArgs

interface RepositoryArgs

The set of arguments for constructing a Repository resource.

property name

name?: pulumi.Input<string>;

Resource name of the repository, of the form {{repo}}. The repo name may contain slashes. eg, name/with/slash

property project

project?: pulumi.Input<string>;

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

property pubsubConfigs

pubsubConfigs?: pulumi.Input<pulumi.Input<RepositoryPubsubConfig>[]>;

How this repository publishes a change in the repository through Cloud Pub/Sub. Keyed by the topic names. Structure is documented below.

interface RepositoryIamBindingArgs

interface RepositoryIamBindingArgs

The set of arguments for constructing a RepositoryIamBinding resource.

property condition

condition?: pulumi.Input<RepositoryIamBindingCondition>;

property members

members: pulumi.Input<pulumi.Input<string>[]>;

property project

project?: pulumi.Input<string>;

The ID of the project in which the resource belongs. If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.

property repository

repository: pulumi.Input<string>;

property role

role: pulumi.Input<string>;

The role that should be applied. Only one gcp.pubsub.TopicIAMBinding can be used per role. Note that custom roles must be of the format [projects|organizations]/{parent-name}/roles/{role-name}.

interface RepositoryIamBindingState

interface RepositoryIamBindingState

Input properties used for looking up and filtering RepositoryIamBinding resources.

property condition

condition?: pulumi.Input<RepositoryIamBindingCondition>;

property etag

etag?: pulumi.Input<string>;

(Computed) The etag of the IAM policy.

property members

members?: pulumi.Input<pulumi.Input<string>[]>;

property project

project?: pulumi.Input<string>;

The ID of the project in which the resource belongs. If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.

property repository

repository?: pulumi.Input<string>;

property role

role?: pulumi.Input<string>;

The role that should be applied. Only one gcp.pubsub.TopicIAMBinding can be used per role. Note that custom roles must be of the format [projects|organizations]/{parent-name}/roles/{role-name}.

interface RepositoryIamMemberArgs

interface RepositoryIamMemberArgs

The set of arguments for constructing a RepositoryIamMember resource.

property condition

condition?: pulumi.Input<RepositoryIamMemberCondition>;

property member

member: pulumi.Input<string>;

property project

project?: pulumi.Input<string>;

The ID of the project in which the resource belongs. If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.

property repository

repository: pulumi.Input<string>;

property role

role: pulumi.Input<string>;

The role that should be applied. Only one gcp.pubsub.TopicIAMBinding can be used per role. Note that custom roles must be of the format [projects|organizations]/{parent-name}/roles/{role-name}.

interface RepositoryIamMemberState

interface RepositoryIamMemberState

Input properties used for looking up and filtering RepositoryIamMember resources.

property condition

condition?: pulumi.Input<RepositoryIamMemberCondition>;

property etag

etag?: pulumi.Input<string>;

(Computed) The etag of the IAM policy.

property member

member?: pulumi.Input<string>;

property project

project?: pulumi.Input<string>;

The ID of the project in which the resource belongs. If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.

property repository

repository?: pulumi.Input<string>;

property role

role?: pulumi.Input<string>;

The role that should be applied. Only one gcp.pubsub.TopicIAMBinding can be used per role. Note that custom roles must be of the format [projects|organizations]/{parent-name}/roles/{role-name}.

interface RepositoryIamPolicyArgs

interface RepositoryIamPolicyArgs

The set of arguments for constructing a RepositoryIamPolicy resource.

property policyData

policyData: pulumi.Input<string>;

The policy data generated by a gcp.organizations.getIAMPolicy data source.

property project

project?: pulumi.Input<string>;

The ID of the project in which the resource belongs. If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.

property repository

repository: pulumi.Input<string>;

interface RepositoryIamPolicyState

interface RepositoryIamPolicyState

Input properties used for looking up and filtering RepositoryIamPolicy resources.

property etag

etag?: pulumi.Input<string>;

(Computed) The etag of the IAM policy.

property policyData

policyData?: pulumi.Input<string>;

The policy data generated by a gcp.organizations.getIAMPolicy data source.

property project

project?: pulumi.Input<string>;

The ID of the project in which the resource belongs. If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.

property repository

repository?: pulumi.Input<string>;

interface RepositoryState

interface RepositoryState

Input properties used for looking up and filtering Repository resources.

property name

name?: pulumi.Input<string>;

Resource name of the repository, of the form {{repo}}. The repo name may contain slashes. eg, name/with/slash

property project

project?: pulumi.Input<string>;

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

property pubsubConfigs

pubsubConfigs?: pulumi.Input<pulumi.Input<RepositoryPubsubConfig>[]>;

How this repository publishes a change in the repository through Cloud Pub/Sub. Keyed by the topic names. Structure is documented below.

property size

size?: pulumi.Input<number>;

The disk usage of the repo, in bytes.

property url

url?: pulumi.Input<string>;

URL to clone the repository from Google Cloud Source Repositories.