Service
Allows management of a single API service for an existing Google Cloud Platform project.
For a list of services available, visit the
API library page or run gcloud services list.
Create a Service Resource
new Service(name: string, args: ServiceArgs, opts?: CustomResourceOptions);def Service(resource_name, opts=None, disable_dependent_services=None, disable_on_destroy=None, project=None, service=None, __props__=None);func NewService(ctx *Context, name string, args ServiceArgs, opts ...ResourceOption) (*Service, error)public Service(string name, ServiceArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args ServiceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ServiceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ServiceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
Service Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The Service resource accepts the following input properties:
- Service
Name string The service to enable.
- Disable
Dependent boolServices If
true, services that are enabled and which depend on this service should also be disabled when this service is destroyed. Iffalseor unset, an error will be generated if any enabled services depend on this service when destroying it.- Disable
On boolDestroy If true, disable the service when the resource is destroyed. Defaults to true. May be useful in the event that a project is long-lived but the infrastructure running in that project changes frequently.
- Project string
The project ID. If not provided, the provider project is used.
- Service string
The service to enable.
- Disable
Dependent boolServices If
true, services that are enabled and which depend on this service should also be disabled when this service is destroyed. Iffalseor unset, an error will be generated if any enabled services depend on this service when destroying it.- Disable
On boolDestroy If true, disable the service when the resource is destroyed. Defaults to true. May be useful in the event that a project is long-lived but the infrastructure running in that project changes frequently.
- Project string
The project ID. If not provided, the provider project is used.
- service string
The service to enable.
- disable
Dependent booleanServices If
true, services that are enabled and which depend on this service should also be disabled when this service is destroyed. Iffalseor unset, an error will be generated if any enabled services depend on this service when destroying it.- disable
On booleanDestroy If true, disable the service when the resource is destroyed. Defaults to true. May be useful in the event that a project is long-lived but the infrastructure running in that project changes frequently.
- project string
The project ID. If not provided, the provider project is used.
- service str
The service to enable.
- disable_
dependent_ boolservices If
true, services that are enabled and which depend on this service should also be disabled when this service is destroyed. Iffalseor unset, an error will be generated if any enabled services depend on this service when destroying it.- disable_
on_ booldestroy If true, disable the service when the resource is destroyed. Defaults to true. May be useful in the event that a project is long-lived but the infrastructure running in that project changes frequently.
- project str
The project ID. If not provided, the provider project is used.
Outputs
All input properties are implicitly available as output properties. Additionally, the Service resource produces the following output properties:
Look up an Existing Service Resource
Get an existing Service resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ServiceState, opts?: CustomResourceOptions): Servicestatic get(resource_name, id, opts=None, disable_dependent_services=None, disable_on_destroy=None, project=None, service=None, __props__=None);func GetService(ctx *Context, name string, id IDInput, state *ServiceState, opts ...ResourceOption) (*Service, error)public static Service Get(string name, Input<string> id, ServiceState? state, CustomResourceOptions? opts = null)- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
The following state arguments are supported:
- Disable
Dependent boolServices If
true, services that are enabled and which depend on this service should also be disabled when this service is destroyed. Iffalseor unset, an error will be generated if any enabled services depend on this service when destroying it.- Disable
On boolDestroy If true, disable the service when the resource is destroyed. Defaults to true. May be useful in the event that a project is long-lived but the infrastructure running in that project changes frequently.
- Project string
The project ID. If not provided, the provider project is used.
- Service
Name string The service to enable.
- Disable
Dependent boolServices If
true, services that are enabled and which depend on this service should also be disabled when this service is destroyed. Iffalseor unset, an error will be generated if any enabled services depend on this service when destroying it.- Disable
On boolDestroy If true, disable the service when the resource is destroyed. Defaults to true. May be useful in the event that a project is long-lived but the infrastructure running in that project changes frequently.
- Project string
The project ID. If not provided, the provider project is used.
- Service string
The service to enable.
- disable
Dependent booleanServices If
true, services that are enabled and which depend on this service should also be disabled when this service is destroyed. Iffalseor unset, an error will be generated if any enabled services depend on this service when destroying it.- disable
On booleanDestroy If true, disable the service when the resource is destroyed. Defaults to true. May be useful in the event that a project is long-lived but the infrastructure running in that project changes frequently.
- project string
The project ID. If not provided, the provider project is used.
- service string
The service to enable.
- disable_
dependent_ boolservices If
true, services that are enabled and which depend on this service should also be disabled when this service is destroyed. Iffalseor unset, an error will be generated if any enabled services depend on this service when destroying it.- disable_
on_ booldestroy If true, disable the service when the resource is destroyed. Defaults to true. May be useful in the event that a project is long-lived but the infrastructure running in that project changes frequently.
- project str
The project ID. If not provided, the provider project is used.
- service str
The service to enable.
Package Details
- Repository
- https://github.com/pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
google-betaTerraform Provider.