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.
cloudrun¶
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.cloudrun.DomainMapping(resource_name, opts=None, location=None, metadata=None, name=None, project=None, spec=None, __props__=None, __name__=None, __opts__=None)¶ Resource to hold the state and status of a user’s domain mapping.
To get more information about DomainMapping, see:
How-to Guides
import pulumi import pulumi_gcp as gcp default_service = gcp.cloudrun.Service("defaultService", location="us-central1", metadata={ "namespace": "my-project-name", }, template={ "spec": { "containers": [{ "image": "gcr.io/cloudrun/hello", }], }, }) default_domain_mapping = gcp.cloudrun.DomainMapping("defaultDomainMapping", location="us-central1", metadata={ "namespace": "my-project-name", }, spec={ "routeName": default_service.name, })
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
location (pulumi.Input[str]) – The location of the cloud run instance. eg us-central1
metadata (pulumi.Input[dict]) – Metadata associated with this DomainMapping. Structure is documented below.
name (pulumi.Input[str]) – Name should be a verified domain
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
spec (pulumi.Input[dict]) – The spec for this DomainMapping. Structure is documented below.
The metadata object supports the following:
annotations(pulumi.Input[dict]) - Annotations is a key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. More info: http://kubernetes.io/docs/user-guide/annotationsgeneration(pulumi.Input[float]) - - A sequence number representing a specific generation of the desired state.labels(pulumi.Input[dict]) - Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and routes. More info: http://kubernetes.io/docs/user-guide/labelsnamespace(pulumi.Input[str]) - In Cloud Run the namespace must be equal to either the project ID or project number.resourceVersion(pulumi.Input[str]) - - An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. They may only be valid for a particular resource or set of resources. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistencyself_link(pulumi.Input[str]) - - SelfLink is a URL representing this object.uid(pulumi.Input[str]) - - UID is a unique id generated by the server on successful creation of a resource and is not allowed to change on PUT operations. More info: http://kubernetes.io/docs/user-guide/identifiers#uids
The spec object supports the following:
certificateMode(pulumi.Input[str]) - The mode of the certificate.forceOverride(pulumi.Input[bool]) - If set, the mapping will override any mapping set before this spec was set. It is recommended that the user leaves this empty to receive an error warning about a potential conflict and only set it once the respective UI has given such a warning.routeName(pulumi.Input[str]) - The name of the Cloud Run Service that this DomainMapping applies to. The route must exist.
location: pulumi.Output[str] = None¶The location of the cloud run instance. eg us-central1
metadata: pulumi.Output[dict] = None¶Metadata associated with this DomainMapping. Structure is documented below.
annotations(dict) - Annotations is a key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. More info: http://kubernetes.io/docs/user-guide/annotationsgeneration(float) - - A sequence number representing a specific generation of the desired state.labels(dict) - Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and routes. More info: http://kubernetes.io/docs/user-guide/labelsnamespace(str) - In Cloud Run the namespace must be equal to either the project ID or project number.resourceVersion(str) - - An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. They may only be valid for a particular resource or set of resources. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistencyself_link(str) - - SelfLink is a URL representing this object.uid(str) - - UID is a unique id generated by the server on successful creation of a resource and is not allowed to change on PUT operations. More info: http://kubernetes.io/docs/user-guide/identifiers#uids
name: pulumi.Output[str] = None¶Name should be a verified domain
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.
spec: pulumi.Output[dict] = None¶The spec for this DomainMapping. Structure is documented below.
certificateMode(str) - The mode of the certificate.forceOverride(bool) - If set, the mapping will override any mapping set before this spec was set. It is recommended that the user leaves this empty to receive an error warning about a potential conflict and only set it once the respective UI has given such a warning.routeName(str) - The name of the Cloud Run Service that this DomainMapping applies to. The route must exist.
status: pulumi.Output[dict] = None¶The current status of the DomainMapping.
conditions(list)message(str)reason(str)status(str)type(str)
mappedRouteName(str)observedGeneration(float)resource_records(list)name(str) - Name should be a verified domainrrdata(str)type(str)
- static
get(resource_name, id, opts=None, location=None, metadata=None, name=None, project=None, spec=None, status=None)¶ Get an existing DomainMapping 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.
location (pulumi.Input[str]) – The location of the cloud run instance. eg us-central1
metadata (pulumi.Input[dict]) – Metadata associated with this DomainMapping. Structure is documented below.
name (pulumi.Input[str]) – Name should be a verified domain
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
spec (pulumi.Input[dict]) – The spec for this DomainMapping. Structure is documented below.
status (pulumi.Input[dict]) – The current status of the DomainMapping.
The metadata object supports the following:
annotations(pulumi.Input[dict]) - Annotations is a key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. More info: http://kubernetes.io/docs/user-guide/annotationsgeneration(pulumi.Input[float]) - - A sequence number representing a specific generation of the desired state.labels(pulumi.Input[dict]) - Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and routes. More info: http://kubernetes.io/docs/user-guide/labelsnamespace(pulumi.Input[str]) - In Cloud Run the namespace must be equal to either the project ID or project number.resourceVersion(pulumi.Input[str]) - - An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. They may only be valid for a particular resource or set of resources. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistencyself_link(pulumi.Input[str]) - - SelfLink is a URL representing this object.uid(pulumi.Input[str]) - - UID is a unique id generated by the server on successful creation of a resource and is not allowed to change on PUT operations. More info: http://kubernetes.io/docs/user-guide/identifiers#uids
The spec object supports the following:
certificateMode(pulumi.Input[str]) - The mode of the certificate.forceOverride(pulumi.Input[bool]) - If set, the mapping will override any mapping set before this spec was set. It is recommended that the user leaves this empty to receive an error warning about a potential conflict and only set it once the respective UI has given such a warning.routeName(pulumi.Input[str]) - The name of the Cloud Run Service that this DomainMapping applies to. The route must exist.
The status object supports the following:
conditions(pulumi.Input[list])message(pulumi.Input[str])reason(pulumi.Input[str])status(pulumi.Input[str])type(pulumi.Input[str])
mappedRouteName(pulumi.Input[str])observedGeneration(pulumi.Input[float])resource_records(pulumi.Input[list])name(pulumi.Input[str]) - Name should be a verified domainrrdata(pulumi.Input[str])type(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.cloudrun.IamBinding(resource_name, opts=None, condition=None, location=None, members=None, project=None, role=None, service=None, __props__=None, __name__=None, __opts__=None)¶ Three different resources help you manage your IAM policy for Cloud Run Service. Each of these resources serves a different use case:
cloudrun.IamPolicy: Authoritative. Sets the IAM policy for the service and replaces any existing policy already attached.cloudrun.IamBinding: 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 service are preserved.cloudrun.IamMember: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the service are preserved.
Note:
cloudrun.IamPolicycannot be used in conjunction withcloudrun.IamBindingandcloudrun.IamMemberor they will fight over what your policy should be.Note:
cloudrun.IamBindingresources can be used in conjunction withcloudrun.IamMemberresources 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.cloudrun.IamPolicy("policy", location=google_cloud_run_service["default"]["location"], project=google_cloud_run_service["default"]["project"], service=google_cloud_run_service["default"]["name"], policy_data=admin.policy_data)
import pulumi import pulumi_gcp as gcp binding = gcp.cloudrun.IamBinding("binding", location=google_cloud_run_service["default"]["location"], project=google_cloud_run_service["default"]["project"], service=google_cloud_run_service["default"]["name"], role="roles/viewer", members=["user:jane@example.com"])
import pulumi import pulumi_gcp as gcp member = gcp.cloudrun.IamMember("member", location=google_cloud_run_service["default"]["location"], project=google_cloud_run_service["default"]["project"], service=google_cloud_run_service["default"]["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.
location (pulumi.Input[str]) – The location of the cloud run instance. eg us-central1 Used to find the parent resource to bind the IAM policy to
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
cloudrun.IamBindingcan be used per role. Note that custom roles must be of the format[projects|organizations]/{parent-name}/roles/{role-name}.service (pulumi.Input[str]) – Used to find the parent resource to bind the IAM policy to
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.
location: pulumi.Output[str] = None¶The location of the cloud run instance. eg us-central1 Used to find the parent resource to bind the IAM policy to
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
cloudrun.IamBindingcan be used per role. Note that custom roles must be of the format[projects|organizations]/{parent-name}/roles/{role-name}.
service: pulumi.Output[str] = None¶Used to find the parent resource to bind the IAM policy to
- static
get(resource_name, id, opts=None, condition=None, etag=None, location=None, members=None, project=None, role=None, service=None)¶ Get an existing IamBinding 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.
location (pulumi.Input[str]) – The location of the cloud run instance. eg us-central1 Used to find the parent resource to bind the IAM policy to
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
cloudrun.IamBindingcan be used per role. Note that custom roles must be of the format[projects|organizations]/{parent-name}/roles/{role-name}.service (pulumi.Input[str]) – Used to find the parent resource to bind the IAM policy to
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.cloudrun.IamMember(resource_name, opts=None, condition=None, location=None, member=None, project=None, role=None, service=None, __props__=None, __name__=None, __opts__=None)¶ Three different resources help you manage your IAM policy for Cloud Run Service. Each of these resources serves a different use case:
cloudrun.IamPolicy: Authoritative. Sets the IAM policy for the service and replaces any existing policy already attached.cloudrun.IamBinding: 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 service are preserved.cloudrun.IamMember: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the service are preserved.
Note:
cloudrun.IamPolicycannot be used in conjunction withcloudrun.IamBindingandcloudrun.IamMemberor they will fight over what your policy should be.Note:
cloudrun.IamBindingresources can be used in conjunction withcloudrun.IamMemberresources 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.cloudrun.IamPolicy("policy", location=google_cloud_run_service["default"]["location"], project=google_cloud_run_service["default"]["project"], service=google_cloud_run_service["default"]["name"], policy_data=admin.policy_data)
import pulumi import pulumi_gcp as gcp binding = gcp.cloudrun.IamBinding("binding", location=google_cloud_run_service["default"]["location"], project=google_cloud_run_service["default"]["project"], service=google_cloud_run_service["default"]["name"], role="roles/viewer", members=["user:jane@example.com"])
import pulumi import pulumi_gcp as gcp member = gcp.cloudrun.IamMember("member", location=google_cloud_run_service["default"]["location"], project=google_cloud_run_service["default"]["project"], service=google_cloud_run_service["default"]["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.
location (pulumi.Input[str]) – The location of the cloud run instance. eg us-central1 Used to find the parent resource to bind the IAM policy to
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
cloudrun.IamBindingcan be used per role. Note that custom roles must be of the format[projects|organizations]/{parent-name}/roles/{role-name}.service (pulumi.Input[str]) – Used to find the parent resource to bind the IAM policy to
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.
location: pulumi.Output[str] = None¶The location of the cloud run instance. eg us-central1 Used to find the parent resource to bind the IAM policy to
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
cloudrun.IamBindingcan be used per role. Note that custom roles must be of the format[projects|organizations]/{parent-name}/roles/{role-name}.
service: pulumi.Output[str] = None¶Used to find the parent resource to bind the IAM policy to
- static
get(resource_name, id, opts=None, condition=None, etag=None, location=None, member=None, project=None, role=None, service=None)¶ Get an existing IamMember 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.
location (pulumi.Input[str]) – The location of the cloud run instance. eg us-central1 Used to find the parent resource to bind the IAM policy to
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
cloudrun.IamBindingcan be used per role. Note that custom roles must be of the format[projects|organizations]/{parent-name}/roles/{role-name}.service (pulumi.Input[str]) – Used to find the parent resource to bind the IAM policy to
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.cloudrun.IamPolicy(resource_name, opts=None, location=None, policy_data=None, project=None, service=None, __props__=None, __name__=None, __opts__=None)¶ Three different resources help you manage your IAM policy for Cloud Run Service. Each of these resources serves a different use case:
cloudrun.IamPolicy: Authoritative. Sets the IAM policy for the service and replaces any existing policy already attached.cloudrun.IamBinding: 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 service are preserved.cloudrun.IamMember: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the service are preserved.
Note:
cloudrun.IamPolicycannot be used in conjunction withcloudrun.IamBindingandcloudrun.IamMemberor they will fight over what your policy should be.Note:
cloudrun.IamBindingresources can be used in conjunction withcloudrun.IamMemberresources 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.cloudrun.IamPolicy("policy", location=google_cloud_run_service["default"]["location"], project=google_cloud_run_service["default"]["project"], service=google_cloud_run_service["default"]["name"], policy_data=admin.policy_data)
import pulumi import pulumi_gcp as gcp binding = gcp.cloudrun.IamBinding("binding", location=google_cloud_run_service["default"]["location"], project=google_cloud_run_service["default"]["project"], service=google_cloud_run_service["default"]["name"], role="roles/viewer", members=["user:jane@example.com"])
import pulumi import pulumi_gcp as gcp member = gcp.cloudrun.IamMember("member", location=google_cloud_run_service["default"]["location"], project=google_cloud_run_service["default"]["project"], service=google_cloud_run_service["default"]["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.
location (pulumi.Input[str]) – The location of the cloud run instance. eg us-central1 Used to find the parent resource to bind the IAM policy to
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.
service (pulumi.Input[str]) – Used to find the parent resource to bind the IAM policy to
etag: pulumi.Output[str] = None¶(Computed) The etag of the IAM policy.
location: pulumi.Output[str] = None¶The location of the cloud run instance. eg us-central1 Used to find the parent resource to bind the IAM policy to
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.
service: pulumi.Output[str] = None¶Used to find the parent resource to bind the IAM policy to
- static
get(resource_name, id, opts=None, etag=None, location=None, policy_data=None, project=None, service=None)¶ Get an existing IamPolicy 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.
location (pulumi.Input[str]) – The location of the cloud run instance. eg us-central1 Used to find the parent resource to bind the IAM policy to
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.
service (pulumi.Input[str]) – Used to find the parent resource to bind the IAM policy to
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.cloudrun.Service(resource_name, opts=None, autogenerate_revision_name=None, location=None, metadata=None, name=None, project=None, template=None, traffics=None, __props__=None, __name__=None, __opts__=None)¶ Service acts as a top-level container that manages a set of Routes and Configurations which implement a network service. Service exists to provide a singular abstraction which can be access controlled, reasoned about, and which encapsulates software lifecycle decisions such as rollout policy and team resource ownership. Service acts only as an orchestrator of the underlying Routes and Configurations (much as a kubernetes Deployment orchestrates ReplicaSets).
The Service’s controller will track the statuses of its owned Configuration and Route, reflecting their statuses and conditions as its own.
See also: https://github.com/knative/serving/blob/master/docs/spec/overview.md#service
To get more information about Service, see:
How-to Guides
import pulumi import pulumi_gcp as gcp default = gcp.cloudrun.Service("default", location="us-central1", template={ "spec": { "containers": [{ "image": "gcr.io/cloudrun/hello", }], }, }, traffics=[{ "latestRevision": True, "percent": 100, }])
import pulumi import pulumi_gcp as gcp instance = gcp.sql.DatabaseInstance("instance", region="us-east1", settings={ "tier": "db-f1-micro", }) default = gcp.cloudrun.Service("default", autogenerate_revision_name=True, location="us-central1", template={ "metadata": { "annotations": { "autoscaling.knative.dev/maxScale": "1000", "run.googleapis.com/client-name": "demo", "run.googleapis.com/cloudsql-instances": instance.name.apply(lambda name: f"my-project-name:us-central1:{name}"), }, }, "spec": { "containers": [{ "image": "gcr.io/cloudrun/hello", }], }, })
import pulumi import pulumi_gcp as gcp default = gcp.cloudrun.Service("default", autogenerate_revision_name=True, location="us-central1", template={ "spec": { "containers": [{ "env": [ { "name": "SOURCE", "value": "remote", }, { "name": "TARGET", "value": "home", }, ], "image": "gcr.io/cloudrun/hello", }], }, }, traffics=[{ "latestRevision": True, "percent": 100, }])
import pulumi import pulumi_gcp as gcp default = gcp.cloudrun.Service("default", location="us-central1", template={ "metadata": { "name": "cloudrun-srv-green", }, "spec": { "containers": [{ "image": "gcr.io/cloudrun/hello", }], }, }, traffics=[ { "percent": 25, "revisionName": "cloudrun-srv-green", }, { "percent": 75, "revisionName": "cloudrun-srv-blue", }, ])
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
autogenerate_revision_name (pulumi.Input[bool]) – If set to
true, the revision name (template.metadata.name) will be omitted and autogenerated by Cloud Run. This cannot be set totruewhiletemplate.metadata.nameis also set. (For legacy support, iftemplate.metadata.nameis unset in state while this field is set to false, the revision name will still autogenerate.)location (pulumi.Input[str]) – The location of the cloud run instance. eg us-central1
metadata (pulumi.Input[dict]) – Metadata associated with this Service, including name, namespace, labels, and annotations. Structure is documented below.
name (pulumi.Input[str]) – Name of the environment variable.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
template (pulumi.Input[dict]) – template holds the latest specification for the Revision to be stamped out. The template references the container image, and may also include labels and annotations that should be attached to the Revision. To correlate a Revision, and/or to force a Revision to be created when the spec doesn’t otherwise change, a nonce label may be provided in the template metadata. For more details, see: https://github.com/knative/serving/blob/master/docs/client-conventions.md#associate-modifications-with-revisions Cloud Run does not currently support referencing a build that is responsible for materializing the container image from source. Structure is documented below.
traffics (pulumi.Input[list]) – Traffic specifies how to distribute traffic over a collection of Knative Revisions and Configurations Structure is documented below.
The metadata object supports the following:
annotations(pulumi.Input[dict]) - Annotations is a key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. More info: http://kubernetes.io/docs/user-guide/annotationsgeneration(pulumi.Input[float]) - - A sequence number representing a specific generation of the desired state.labels(pulumi.Input[dict]) - Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and routes. More info: http://kubernetes.io/docs/user-guide/labelsnamespace(pulumi.Input[str]) - In Cloud Run the namespace must be equal to either the project ID or project number.resourceVersion(pulumi.Input[str]) - - An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. They may only be valid for a particular resource or set of resources. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistencyself_link(pulumi.Input[str]) - - SelfLink is a URL representing this object.uid(pulumi.Input[str]) - - UID is a unique id generated by the server on successful creation of a resource and is not allowed to change on PUT operations. More info: http://kubernetes.io/docs/user-guide/identifiers#uids
The template object supports the following:
metadata(pulumi.Input[dict]) - Metadata associated with this Service, including name, namespace, labels, and annotations. Structure is documented below.annotations(pulumi.Input[dict]) - Annotations is a key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. More info: http://kubernetes.io/docs/user-guide/annotationsgeneration(pulumi.Input[float]) - - A sequence number representing a specific generation of the desired state.labels(pulumi.Input[dict]) - Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and routes. More info: http://kubernetes.io/docs/user-guide/labelsname(pulumi.Input[str]) - Name of the environment variable.namespace(pulumi.Input[str]) - In Cloud Run the namespace must be equal to either the project ID or project number.resourceVersion(pulumi.Input[str]) - - An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. They may only be valid for a particular resource or set of resources. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistencyself_link(pulumi.Input[str]) - - SelfLink is a URL representing this object.uid(pulumi.Input[str]) - - UID is a unique id generated by the server on successful creation of a resource and is not allowed to change on PUT operations. More info: http://kubernetes.io/docs/user-guide/identifiers#uids
spec(pulumi.Input[dict]) - RevisionSpec holds the desired state of the Revision (from the client). Structure is documented below.containerConcurrency(pulumi.Input[float]) - ContainerConcurrency specifies the maximum allowed in-flight (concurrent) requests per container of the Revision. Values are:0thread-safe, the system should manage the max concurrency. This is the default value.1not-thread-safe. Single concurrency2-Nthread-safe, max concurrency of N
containers(pulumi.Input[list]) - Container defines the unit of execution for this Revision. In the context of a Revision, we disallow a number of the fields of this Container, including: name, ports, and volumeMounts. The runtime contract is documented here: https://github.com/knative/serving/blob/master/docs/runtime-contract.md Structure is documented below.args(pulumi.Input[list]) - Arguments to the entrypoint. The docker image’s CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container’s environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shellcommands(pulumi.Input[list]) - Entrypoint array. Not executed within a shell. The docker image’s ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container’s environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shellenvFroms(pulumi.Input[list]) - - (Optional, Deprecated) List of sources to populate environment variables in the container. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Structure is documented below.configMapRef(pulumi.Input[dict]) - The ConfigMap to select from. Structure is documented below.localObjectReference(pulumi.Input[dict]) - The Secret to select from. Structure is documented below.name(pulumi.Input[str]) - Name of the environment variable.
optional(pulumi.Input[bool]) - Specify whether the Secret must be defined
prefix(pulumi.Input[str]) - An optional identifier to prepend to each key in the ConfigMap.secretRef(pulumi.Input[dict]) - The Secret to select from. Structure is documented below.localObjectReference(pulumi.Input[dict]) - The Secret to select from. Structure is documented below.name(pulumi.Input[str]) - Name of the environment variable.
optional(pulumi.Input[bool]) - Specify whether the Secret must be defined
envs(pulumi.Input[list]) - List of environment variables to set in the container. Structure is documented below.name(pulumi.Input[str]) - Name of the environment variable.value(pulumi.Input[str]) - Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any route environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to “”.
image(pulumi.Input[str]) - Docker image name. This is most often a reference to a container located in the container registry, such as gcr.io/cloudrun/hello More info: https://kubernetes.io/docs/concepts/containers/imagesresources(pulumi.Input[dict]) - Compute Resources required by this container. Used to set values such as max memory More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources Structure is documented below.limits(pulumi.Input[dict]) - Limits describes the maximum amount of compute resources allowed. The values of the map is string form of the ‘quantity’ k8s type: https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.gorequests(pulumi.Input[dict]) - Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. The values of the map is string form of the ‘quantity’ k8s type: https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go
workingDir(pulumi.Input[str]) - - (Optional, Deprecated) Container’s working directory. If not specified, the container runtime’s default will be used, which might be configured in the container image.
service_account_name(pulumi.Input[str]) - Email address of the IAM service account associated with the revision of the service. The service account represents the identity of the running revision, and determines what permissions the revision has. If not provided, the revision will use the project’s default service account.servingState(pulumi.Input[str]) - - ServingState holds a value describing the state the resources are in for this Revision. It is expected that the system will manipulate this based on routability and load.timeoutSeconds(pulumi.Input[float]) - TimeoutSeconds holds the max duration the instance is allowed for responding to a request.
The traffics object supports the following:
latestRevision(pulumi.Input[bool]) - LatestRevision may be optionally provided to indicate that the latest ready Revision of the Configuration should be used for this traffic target. When provided LatestRevision must be true if RevisionName is empty; it must be false when RevisionName is non-empty.percent(pulumi.Input[float]) - Percent specifies percent of the traffic to this Revision or Configuration.revisionName(pulumi.Input[str]) - RevisionName of a specific revision to which to send this portion of traffic.
autogenerate_revision_name: pulumi.Output[bool] = None¶If set to
true, the revision name (template.metadata.name) will be omitted and autogenerated by Cloud Run. This cannot be set totruewhiletemplate.metadata.nameis also set. (For legacy support, iftemplate.metadata.nameis unset in state while this field is set to false, the revision name will still autogenerate.)
location: pulumi.Output[str] = None¶The location of the cloud run instance. eg us-central1
metadata: pulumi.Output[dict] = None¶Metadata associated with this Service, including name, namespace, labels, and annotations. Structure is documented below.
annotations(dict) - Annotations is a key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. More info: http://kubernetes.io/docs/user-guide/annotationsgeneration(float) - - A sequence number representing a specific generation of the desired state.labels(dict) - Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and routes. More info: http://kubernetes.io/docs/user-guide/labelsnamespace(str) - In Cloud Run the namespace must be equal to either the project ID or project number.resourceVersion(str) - - An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. They may only be valid for a particular resource or set of resources. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistencyself_link(str) - - SelfLink is a URL representing this object.uid(str) - - UID is a unique id generated by the server on successful creation of a resource and is not allowed to change on PUT operations. More info: http://kubernetes.io/docs/user-guide/identifiers#uids
name: pulumi.Output[str] = None¶Name of the environment variable.
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.
status: pulumi.Output[dict] = None¶The current status of the Service.
conditions(list)message(str)reason(str)status(str)type(str)
latestCreatedRevisionName(str)latestReadyRevisionName(str)observedGeneration(float)url(str)
template: pulumi.Output[dict] = None¶template holds the latest specification for the Revision to be stamped out. The template references the container image, and may also include labels and annotations that should be attached to the Revision. To correlate a Revision, and/or to force a Revision to be created when the spec doesn’t otherwise change, a nonce label may be provided in the template metadata. For more details, see: https://github.com/knative/serving/blob/master/docs/client-conventions.md#associate-modifications-with-revisions Cloud Run does not currently support referencing a build that is responsible for materializing the container image from source. Structure is documented below.
metadata(dict) - Metadata associated with this Service, including name, namespace, labels, and annotations. Structure is documented below.annotations(dict) - Annotations is a key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. More info: http://kubernetes.io/docs/user-guide/annotationsgeneration(float) - - A sequence number representing a specific generation of the desired state.labels(dict) - Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and routes. More info: http://kubernetes.io/docs/user-guide/labelsname(str) - Name of the environment variable.namespace(str) - In Cloud Run the namespace must be equal to either the project ID or project number.resourceVersion(str) - - An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. They may only be valid for a particular resource or set of resources. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistencyself_link(str) - - SelfLink is a URL representing this object.uid(str) - - UID is a unique id generated by the server on successful creation of a resource and is not allowed to change on PUT operations. More info: http://kubernetes.io/docs/user-guide/identifiers#uids
spec(dict) - RevisionSpec holds the desired state of the Revision (from the client). Structure is documented below.containerConcurrency(float) - ContainerConcurrency specifies the maximum allowed in-flight (concurrent) requests per container of the Revision. Values are:0thread-safe, the system should manage the max concurrency. This is the default value.1not-thread-safe. Single concurrency2-Nthread-safe, max concurrency of N
containers(list) - Container defines the unit of execution for this Revision. In the context of a Revision, we disallow a number of the fields of this Container, including: name, ports, and volumeMounts. The runtime contract is documented here: https://github.com/knative/serving/blob/master/docs/runtime-contract.md Structure is documented below.args(list) - Arguments to the entrypoint. The docker image’s CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container’s environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shellcommands(list) - Entrypoint array. Not executed within a shell. The docker image’s ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container’s environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shellenvFroms(list) - - (Optional, Deprecated) List of sources to populate environment variables in the container. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Structure is documented below.configMapRef(dict) - The ConfigMap to select from. Structure is documented below.localObjectReference(dict) - The Secret to select from. Structure is documented below.name(str) - Name of the environment variable.
optional(bool) - Specify whether the Secret must be defined
prefix(str) - An optional identifier to prepend to each key in the ConfigMap.secretRef(dict) - The Secret to select from. Structure is documented below.localObjectReference(dict) - The Secret to select from. Structure is documented below.name(str) - Name of the environment variable.
optional(bool) - Specify whether the Secret must be defined
envs(list) - List of environment variables to set in the container. Structure is documented below.name(str) - Name of the environment variable.value(str) - Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any route environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to “”.
image(str) - Docker image name. This is most often a reference to a container located in the container registry, such as gcr.io/cloudrun/hello More info: https://kubernetes.io/docs/concepts/containers/imagesresources(dict) - Compute Resources required by this container. Used to set values such as max memory More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources Structure is documented below.limits(dict) - Limits describes the maximum amount of compute resources allowed. The values of the map is string form of the ‘quantity’ k8s type: https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.gorequests(dict) - Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. The values of the map is string form of the ‘quantity’ k8s type: https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go
workingDir(str) - - (Optional, Deprecated) Container’s working directory. If not specified, the container runtime’s default will be used, which might be configured in the container image.
service_account_name(str) - Email address of the IAM service account associated with the revision of the service. The service account represents the identity of the running revision, and determines what permissions the revision has. If not provided, the revision will use the project’s default service account.servingState(str) - - ServingState holds a value describing the state the resources are in for this Revision. It is expected that the system will manipulate this based on routability and load.timeoutSeconds(float) - TimeoutSeconds holds the max duration the instance is allowed for responding to a request.
traffics: pulumi.Output[list] = None¶Traffic specifies how to distribute traffic over a collection of Knative Revisions and Configurations Structure is documented below.
latestRevision(bool) - LatestRevision may be optionally provided to indicate that the latest ready Revision of the Configuration should be used for this traffic target. When provided LatestRevision must be true if RevisionName is empty; it must be false when RevisionName is non-empty.percent(float) - Percent specifies percent of the traffic to this Revision or Configuration.revisionName(str) - RevisionName of a specific revision to which to send this portion of traffic.
- static
get(resource_name, id, opts=None, autogenerate_revision_name=None, location=None, metadata=None, name=None, project=None, status=None, template=None, traffics=None)¶ Get an existing Service 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.
autogenerate_revision_name (pulumi.Input[bool]) – If set to
true, the revision name (template.metadata.name) will be omitted and autogenerated by Cloud Run. This cannot be set totruewhiletemplate.metadata.nameis also set. (For legacy support, iftemplate.metadata.nameis unset in state while this field is set to false, the revision name will still autogenerate.)location (pulumi.Input[str]) – The location of the cloud run instance. eg us-central1
metadata (pulumi.Input[dict]) – Metadata associated with this Service, including name, namespace, labels, and annotations. Structure is documented below.
name (pulumi.Input[str]) – Name of the environment variable.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
status (pulumi.Input[dict]) – The current status of the Service.
template (pulumi.Input[dict]) – template holds the latest specification for the Revision to be stamped out. The template references the container image, and may also include labels and annotations that should be attached to the Revision. To correlate a Revision, and/or to force a Revision to be created when the spec doesn’t otherwise change, a nonce label may be provided in the template metadata. For more details, see: https://github.com/knative/serving/blob/master/docs/client-conventions.md#associate-modifications-with-revisions Cloud Run does not currently support referencing a build that is responsible for materializing the container image from source. Structure is documented below.
traffics (pulumi.Input[list]) – Traffic specifies how to distribute traffic over a collection of Knative Revisions and Configurations Structure is documented below.
The metadata object supports the following:
annotations(pulumi.Input[dict]) - Annotations is a key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. More info: http://kubernetes.io/docs/user-guide/annotationsgeneration(pulumi.Input[float]) - - A sequence number representing a specific generation of the desired state.labels(pulumi.Input[dict]) - Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and routes. More info: http://kubernetes.io/docs/user-guide/labelsnamespace(pulumi.Input[str]) - In Cloud Run the namespace must be equal to either the project ID or project number.resourceVersion(pulumi.Input[str]) - - An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. They may only be valid for a particular resource or set of resources. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistencyself_link(pulumi.Input[str]) - - SelfLink is a URL representing this object.uid(pulumi.Input[str]) - - UID is a unique id generated by the server on successful creation of a resource and is not allowed to change on PUT operations. More info: http://kubernetes.io/docs/user-guide/identifiers#uids
The status object supports the following:
conditions(pulumi.Input[list])message(pulumi.Input[str])reason(pulumi.Input[str])status(pulumi.Input[str])type(pulumi.Input[str])
latestCreatedRevisionName(pulumi.Input[str])latestReadyRevisionName(pulumi.Input[str])observedGeneration(pulumi.Input[float])url(pulumi.Input[str])
The template object supports the following:
metadata(pulumi.Input[dict]) - Metadata associated with this Service, including name, namespace, labels, and annotations. Structure is documented below.annotations(pulumi.Input[dict]) - Annotations is a key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. More info: http://kubernetes.io/docs/user-guide/annotationsgeneration(pulumi.Input[float]) - - A sequence number representing a specific generation of the desired state.labels(pulumi.Input[dict]) - Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and routes. More info: http://kubernetes.io/docs/user-guide/labelsname(pulumi.Input[str]) - Name of the environment variable.namespace(pulumi.Input[str]) - In Cloud Run the namespace must be equal to either the project ID or project number.resourceVersion(pulumi.Input[str]) - - An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. They may only be valid for a particular resource or set of resources. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistencyself_link(pulumi.Input[str]) - - SelfLink is a URL representing this object.uid(pulumi.Input[str]) - - UID is a unique id generated by the server on successful creation of a resource and is not allowed to change on PUT operations. More info: http://kubernetes.io/docs/user-guide/identifiers#uids
spec(pulumi.Input[dict]) - RevisionSpec holds the desired state of the Revision (from the client). Structure is documented below.containerConcurrency(pulumi.Input[float]) - ContainerConcurrency specifies the maximum allowed in-flight (concurrent) requests per container of the Revision. Values are:0thread-safe, the system should manage the max concurrency. This is the default value.1not-thread-safe. Single concurrency2-Nthread-safe, max concurrency of N
containers(pulumi.Input[list]) - Container defines the unit of execution for this Revision. In the context of a Revision, we disallow a number of the fields of this Container, including: name, ports, and volumeMounts. The runtime contract is documented here: https://github.com/knative/serving/blob/master/docs/runtime-contract.md Structure is documented below.args(pulumi.Input[list]) - Arguments to the entrypoint. The docker image’s CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container’s environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shellcommands(pulumi.Input[list]) - Entrypoint array. Not executed within a shell. The docker image’s ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container’s environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shellenvFroms(pulumi.Input[list]) - - (Optional, Deprecated) List of sources to populate environment variables in the container. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Structure is documented below.configMapRef(pulumi.Input[dict]) - The ConfigMap to select from. Structure is documented below.localObjectReference(pulumi.Input[dict]) - The Secret to select from. Structure is documented below.name(pulumi.Input[str]) - Name of the environment variable.
optional(pulumi.Input[bool]) - Specify whether the Secret must be defined
prefix(pulumi.Input[str]) - An optional identifier to prepend to each key in the ConfigMap.secretRef(pulumi.Input[dict]) - The Secret to select from. Structure is documented below.localObjectReference(pulumi.Input[dict]) - The Secret to select from. Structure is documented below.name(pulumi.Input[str]) - Name of the environment variable.
optional(pulumi.Input[bool]) - Specify whether the Secret must be defined
envs(pulumi.Input[list]) - List of environment variables to set in the container. Structure is documented below.name(pulumi.Input[str]) - Name of the environment variable.value(pulumi.Input[str]) - Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any route environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to “”.
image(pulumi.Input[str]) - Docker image name. This is most often a reference to a container located in the container registry, such as gcr.io/cloudrun/hello More info: https://kubernetes.io/docs/concepts/containers/imagesresources(pulumi.Input[dict]) - Compute Resources required by this container. Used to set values such as max memory More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources Structure is documented below.limits(pulumi.Input[dict]) - Limits describes the maximum amount of compute resources allowed. The values of the map is string form of the ‘quantity’ k8s type: https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.gorequests(pulumi.Input[dict]) - Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. The values of the map is string form of the ‘quantity’ k8s type: https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go
workingDir(pulumi.Input[str]) - - (Optional, Deprecated) Container’s working directory. If not specified, the container runtime’s default will be used, which might be configured in the container image.
service_account_name(pulumi.Input[str]) - Email address of the IAM service account associated with the revision of the service. The service account represents the identity of the running revision, and determines what permissions the revision has. If not provided, the revision will use the project’s default service account.servingState(pulumi.Input[str]) - - ServingState holds a value describing the state the resources are in for this Revision. It is expected that the system will manipulate this based on routability and load.timeoutSeconds(pulumi.Input[float]) - TimeoutSeconds holds the max duration the instance is allowed for responding to a request.
The traffics object supports the following:
latestRevision(pulumi.Input[bool]) - LatestRevision may be optionally provided to indicate that the latest ready Revision of the Configuration should be used for this traffic target. When provided LatestRevision must be true if RevisionName is empty; it must be false when RevisionName is non-empty.percent(pulumi.Input[float]) - Percent specifies percent of the traffic to this Revision or Configuration.revisionName(pulumi.Input[str]) - RevisionName of a specific revision to which to send this portion of traffic.
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