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.
sourcerepo¶
This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the pulumi/pulumi-gcp repo; however, if that doesn’t turn up anything, please consult the source terraform-providers/terraform-provider-google repo.
- class
pulumi_gcp.sourcerepo.Repository(resource_name, opts=None, name=None, project=None, pubsub_configs=None, __props__=None, __name__=None, __opts__=None)¶ A repository (or repo) is a Git repository storing versioned source content.
To get more information about Repository, see:
How-to Guides
import pulumi import pulumi_gcp as gcp my_repo = gcp.sourcerepo.Repository("my-repo")
import pulumi import pulumi_gcp as gcp test_account = gcp.service_account.Account("test-account", account_id="my-account", display_name="Test Service Account") topic = gcp.pubsub.Topic("topic") my_repo = gcp.sourcerepo.Repository("my-repo", pubsub_configs=[{ "topic": topic.id, "messageFormat": "JSON", "service_account_email": test_account.email, }])
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
name (pulumi.Input[str]) – Resource name of the repository, of the form
{{repo}}. The repo name may contain slashes. eg,name/with/slashproject (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
pubsub_configs (pulumi.Input[list]) – How this repository publishes a change in the repository through Cloud Pub/Sub. Keyed by the topic names. Structure is documented below.
The pubsub_configs object supports the following:
messageFormat(pulumi.Input[str]) - The format of the Cloud Pub/Sub messages.PROTOBUF: The message payload is a serialized protocol buffer of SourceRepoEvent.
JSON: The message payload is a JSON string of SourceRepoEvent.
service_account_email(pulumi.Input[str]) - Email address of the service account used for publishing Cloud Pub/Sub messages. This service account needs to be in the same project as the PubsubConfig. When added, the caller needs to have iam.serviceAccounts.actAs permission on this service account. If unspecified, it defaults to the compute engine default service account.topic(pulumi.Input[str]) - The identifier for this object. Format specified above.
name: pulumi.Output[str] = None¶Resource name of the repository, of the form
{{repo}}. The repo name may contain slashes. eg,name/with/slash
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
pubsub_configs: pulumi.Output[list] = None¶How this repository publishes a change in the repository through Cloud Pub/Sub. Keyed by the topic names. Structure is documented below.
messageFormat(str) - The format of the Cloud Pub/Sub messages.PROTOBUF: The message payload is a serialized protocol buffer of SourceRepoEvent.
JSON: The message payload is a JSON string of SourceRepoEvent.
service_account_email(str) - Email address of the service account used for publishing Cloud Pub/Sub messages. This service account needs to be in the same project as the PubsubConfig. When added, the caller needs to have iam.serviceAccounts.actAs permission on this service account. If unspecified, it defaults to the compute engine default service account.topic(str) - The identifier for this object. Format specified above.
size: pulumi.Output[float] = None¶The disk usage of the repo, in bytes.
url: pulumi.Output[str] = None¶URL to clone the repository from Google Cloud Source Repositories.
- static
get(resource_name, id, opts=None, name=None, project=None, pubsub_configs=None, size=None, url=None)¶ Get an existing Repository resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
name (pulumi.Input[str]) – Resource name of the repository, of the form
{{repo}}. The repo name may contain slashes. eg,name/with/slashproject (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
pubsub_configs (pulumi.Input[list]) – How this repository publishes a change in the repository through Cloud Pub/Sub. Keyed by the topic names. Structure is documented below.
size (pulumi.Input[float]) – The disk usage of the repo, in bytes.
url (pulumi.Input[str]) – URL to clone the repository from Google Cloud Source Repositories.
The pubsub_configs object supports the following:
messageFormat(pulumi.Input[str]) - The format of the Cloud Pub/Sub messages.PROTOBUF: The message payload is a serialized protocol buffer of SourceRepoEvent.
JSON: The message payload is a JSON string of SourceRepoEvent.
service_account_email(pulumi.Input[str]) - Email address of the service account used for publishing Cloud Pub/Sub messages. This service account needs to be in the same project as the PubsubConfig. When added, the caller needs to have iam.serviceAccounts.actAs permission on this service account. If unspecified, it defaults to the compute engine default service account.topic(pulumi.Input[str]) - The identifier for this object. Format specified above.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.sourcerepo.RepositoryIamBinding(resource_name, opts=None, condition=None, members=None, project=None, repository=None, role=None, __props__=None, __name__=None, __opts__=None)¶ Three different resources help you manage your IAM policy for Cloud Pub/Sub Topic. Each of these resources serves a different use case:
pubsub.TopicIAMPolicy: Authoritative. Sets the IAM policy for the topic and replaces any existing policy already attached.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.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:
pubsub.TopicIAMPolicycannot be used in conjunction withpubsub.TopicIAMBindingandpubsub.TopicIAMMemberor they will fight over what your policy should be.Note:
pubsub.TopicIAMBindingresources can be used in conjunction withpubsub.TopicIAMMemberresources only if they do not grant privilege to the same role.import pulumi import pulumi_gcp as gcp admin = gcp.organizations.get_iam_policy(binding=[{ "role": "roles/viewer", "members": ["user:jane@example.com"], }]) policy = gcp.pubsub.TopicIAMPolicy("policy", project=google_pubsub_topic["example"]["project"], topic=google_pubsub_topic["example"]["name"], policy_data=admin.policy_data)
import pulumi import pulumi_gcp as gcp binding = gcp.pubsub.TopicIAMBinding("binding", project=google_pubsub_topic["example"]["project"], topic=google_pubsub_topic["example"]["name"], role="roles/viewer", members=["user:jane@example.com"])
import pulumi import pulumi_gcp as gcp member = gcp.pubsub.TopicIAMMember("member", project=google_pubsub_topic["example"]["project"], topic=google_pubsub_topic["example"]["name"], role="roles/viewer", member="user:jane@example.com")
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
project (pulumi.Input[str]) – 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.
role (pulumi.Input[str]) – The role that should be applied. Only one
pubsub.TopicIAMBindingcan be used per role. Note that custom roles must be of the format[projects|organizations]/{parent-name}/roles/{role-name}.
The condition object supports the following:
description(pulumi.Input[str])expression(pulumi.Input[str])title(pulumi.Input[str])
etag: pulumi.Output[str] = None¶(Computed) The etag of the IAM policy.
project: pulumi.Output[str] = None¶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.
role: pulumi.Output[str] = None¶The role that should be applied. Only one
pubsub.TopicIAMBindingcan be used per role. Note that custom roles must be of the format[projects|organizations]/{parent-name}/roles/{role-name}.
- static
get(resource_name, id, opts=None, condition=None, etag=None, members=None, project=None, repository=None, role=None)¶ Get an existing RepositoryIamBinding resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
etag (pulumi.Input[str]) – (Computed) The etag of the IAM policy.
project (pulumi.Input[str]) – 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.
role (pulumi.Input[str]) – The role that should be applied. Only one
pubsub.TopicIAMBindingcan be used per role. Note that custom roles must be of the format[projects|organizations]/{parent-name}/roles/{role-name}.
The condition object supports the following:
description(pulumi.Input[str])expression(pulumi.Input[str])title(pulumi.Input[str])
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.sourcerepo.RepositoryIamMember(resource_name, opts=None, condition=None, member=None, project=None, repository=None, role=None, __props__=None, __name__=None, __opts__=None)¶ Three different resources help you manage your IAM policy for Cloud Pub/Sub Topic. Each of these resources serves a different use case:
pubsub.TopicIAMPolicy: Authoritative. Sets the IAM policy for the topic and replaces any existing policy already attached.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.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:
pubsub.TopicIAMPolicycannot be used in conjunction withpubsub.TopicIAMBindingandpubsub.TopicIAMMemberor they will fight over what your policy should be.Note:
pubsub.TopicIAMBindingresources can be used in conjunction withpubsub.TopicIAMMemberresources only if they do not grant privilege to the same role.import pulumi import pulumi_gcp as gcp admin = gcp.organizations.get_iam_policy(binding=[{ "role": "roles/viewer", "members": ["user:jane@example.com"], }]) policy = gcp.pubsub.TopicIAMPolicy("policy", project=google_pubsub_topic["example"]["project"], topic=google_pubsub_topic["example"]["name"], policy_data=admin.policy_data)
import pulumi import pulumi_gcp as gcp binding = gcp.pubsub.TopicIAMBinding("binding", project=google_pubsub_topic["example"]["project"], topic=google_pubsub_topic["example"]["name"], role="roles/viewer", members=["user:jane@example.com"])
import pulumi import pulumi_gcp as gcp member = gcp.pubsub.TopicIAMMember("member", project=google_pubsub_topic["example"]["project"], topic=google_pubsub_topic["example"]["name"], role="roles/viewer", member="user:jane@example.com")
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
project (pulumi.Input[str]) – 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.
role (pulumi.Input[str]) – The role that should be applied. Only one
pubsub.TopicIAMBindingcan be used per role. Note that custom roles must be of the format[projects|organizations]/{parent-name}/roles/{role-name}.
The condition object supports the following:
description(pulumi.Input[str])expression(pulumi.Input[str])title(pulumi.Input[str])
etag: pulumi.Output[str] = None¶(Computed) The etag of the IAM policy.
project: pulumi.Output[str] = None¶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.
role: pulumi.Output[str] = None¶The role that should be applied. Only one
pubsub.TopicIAMBindingcan be used per role. Note that custom roles must be of the format[projects|organizations]/{parent-name}/roles/{role-name}.
- static
get(resource_name, id, opts=None, condition=None, etag=None, member=None, project=None, repository=None, role=None)¶ Get an existing RepositoryIamMember resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
etag (pulumi.Input[str]) – (Computed) The etag of the IAM policy.
project (pulumi.Input[str]) – 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.
role (pulumi.Input[str]) – The role that should be applied. Only one
pubsub.TopicIAMBindingcan be used per role. Note that custom roles must be of the format[projects|organizations]/{parent-name}/roles/{role-name}.
The condition object supports the following:
description(pulumi.Input[str])expression(pulumi.Input[str])title(pulumi.Input[str])
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.sourcerepo.RepositoryIamPolicy(resource_name, opts=None, policy_data=None, project=None, repository=None, __props__=None, __name__=None, __opts__=None)¶ Three different resources help you manage your IAM policy for Cloud Pub/Sub Topic. Each of these resources serves a different use case:
pubsub.TopicIAMPolicy: Authoritative. Sets the IAM policy for the topic and replaces any existing policy already attached.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.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:
pubsub.TopicIAMPolicycannot be used in conjunction withpubsub.TopicIAMBindingandpubsub.TopicIAMMemberor they will fight over what your policy should be.Note:
pubsub.TopicIAMBindingresources can be used in conjunction withpubsub.TopicIAMMemberresources only if they do not grant privilege to the same role.import pulumi import pulumi_gcp as gcp admin = gcp.organizations.get_iam_policy(binding=[{ "role": "roles/viewer", "members": ["user:jane@example.com"], }]) policy = gcp.pubsub.TopicIAMPolicy("policy", project=google_pubsub_topic["example"]["project"], topic=google_pubsub_topic["example"]["name"], policy_data=admin.policy_data)
import pulumi import pulumi_gcp as gcp binding = gcp.pubsub.TopicIAMBinding("binding", project=google_pubsub_topic["example"]["project"], topic=google_pubsub_topic["example"]["name"], role="roles/viewer", members=["user:jane@example.com"])
import pulumi import pulumi_gcp as gcp member = gcp.pubsub.TopicIAMMember("member", project=google_pubsub_topic["example"]["project"], topic=google_pubsub_topic["example"]["name"], role="roles/viewer", member="user:jane@example.com")
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
policy_data (pulumi.Input[str]) – The policy data generated by a
organizations.getIAMPolicydata source.project (pulumi.Input[str]) – 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.
etag: pulumi.Output[str] = None¶(Computed) The etag of the IAM policy.
policy_data: pulumi.Output[str] = None¶The policy data generated by a
organizations.getIAMPolicydata source.
project: pulumi.Output[str] = None¶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.
- static
get(resource_name, id, opts=None, etag=None, policy_data=None, project=None, repository=None)¶ Get an existing RepositoryIamPolicy resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
etag (pulumi.Input[str]) – (Computed) The etag of the IAM policy.
policy_data (pulumi.Input[str]) – The policy data generated by a
organizations.getIAMPolicydata source.project (pulumi.Input[str]) – 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.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str