2017-11-07 23:19:57 +00:00
---
layout: "google"
page_title: "Google: google_project_service"
2018-03-05 23:33:16 +00:00
sidebar_current: "docs-google-project-service-x"
2017-11-07 23:19:57 +00:00
description: |-
Allows management of a single API service for a Google Cloud Platform project.
---
# google\_project\_service
Allows management of a single API service for an existing Google Cloud Platform project.
For a list of services available, visit the
2018-04-12 20:26:34 +00:00
[API library page ](https://console.cloud.google.com/apis/library ) or run `gcloud services list` .
2017-11-07 23:19:57 +00:00
~> **Note:** This resource _must not_ be used in conjunction with
`google_project_services` or they will fight over which services should be enabled.
## Example Usage
```hcl
resource "google_project_service" "project" {
project = "your-project-id"
service = "iam.googleapis.com"
}
```
## Argument Reference
The following arguments are supported:
* `service` - (Required) The service to enable.
* `project` - (Optional) The project ID. If not provided, the provider project is used.
2018-01-16 22:39:27 +00:00
* `disable_on_destroy` - (Optional) If true, disable the service when the terraform 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.
2018-05-23 00:45:22 +00:00
## Import
Project services can be imported using the `project_id` and `service` , e.g.
```
$ terraform import google_project_services.my_project your-project-id/iam.googleapis.com
```