blob: 96ac11270760754af96928d69e6d0b8dbba861e9 [file] [log] [blame] [edit]
---
# ----------------------------------------------------------------------------
#
# *** AUTO GENERATED CODE *** Type: MMv1 ***
#
# ----------------------------------------------------------------------------
#
# This file is automatically generated by Magic Modules and manual
# changes will be clobbered when the file is regenerated.
#
# Please read more about how to change this file in
# .github/CONTRIBUTING.md.
#
# ----------------------------------------------------------------------------
subcategory: "Identity-Aware Proxy"
description: |-
Contains the data that describes an Identity Aware Proxy owned client.
---
# google_iap_client
Contains the data that describes an Identity Aware Proxy owned client.
~> **Note:** Only internal org clients can be created via declarative tools. External clients must be
manually created via the GCP console. This restriction is due to the existing APIs and not lack of support
in this tool.
To get more information about Client, see:
* [API documentation](https://cloud.google.com/iap/docs/reference/rest/v1/projects.brands.identityAwareProxyClients)
* How-to Guides
* [Setting up IAP Client](https://cloud.google.com/iap/docs/authentication-howto)
~> **Warning:** All arguments including the following potentially sensitive
values will be stored in the raw state as plain text: `secret`.
[Read more about sensitive data in state](https://www.terraform.io/language/state/sensitive-data).
## Example Usage - Iap Client
```hcl
resource "google_project" "project" {
project_id = "my-project"
name = "my-project"
org_id = "123456789"
deletion_policy = "DELETE"
}
resource "google_project_service" "project_service" {
project = google_project.project.project_id
service = "iap.googleapis.com"
}
resource "google_iap_brand" "project_brand" {
support_email = "support@example.com"
application_title = "Cloud IAP protected Application"
project = google_project_service.project_service.project
}
resource "google_iap_client" "project_client" {
display_name = "Test Client"
brand = google_iap_brand.project_brand.name
}
```
## Argument Reference
The following arguments are supported:
* `display_name` -
(Required)
Human-friendly name given to the OAuth client.
* `brand` -
(Required)
Identifier of the brand to which this client
is attached to. The format is
`projects/{project_number}/brands/{brand_id}`.
- - -
## Attributes Reference
In addition to the arguments listed above, the following computed attributes are exported:
* `id` - an identifier for the resource with format `{{brand}}/identityAwareProxyClients/{{client_id}}`
* `secret` -
Output only. Client secret of the OAuth client.
**Note**: This property is sensitive and will not be displayed in the plan.
* `client_id` -
Output only. Unique identifier of the OAuth client.
## Timeouts
This resource provides the following
[Timeouts](https://developer.hashicorp.com/terraform/plugin/sdkv2/resources/retries-and-customizable-timeouts) configuration options:
- `create` - Default is 20 minutes.
- `delete` - Default is 20 minutes.
## Import
Client can be imported using any of these accepted formats:
* `{{brand}}/identityAwareProxyClients/{{client_id}}`
* `{{brand}}/{{client_id}}`
In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import Client using one of the formats above. For example:
```tf
import {
id = "{{brand}}/identityAwareProxyClients/{{client_id}}"
to = google_iap_client.default
}
```
When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), Client can be imported using one of the formats above. For example:
```
$ terraform import google_iap_client.default {{brand}}/identityAwareProxyClients/{{client_id}}
$ terraform import google_iap_client.default {{brand}}/{{client_id}}
```