1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. iap
  5. Client
Google Cloud v8.25.1 published on Wednesday, Apr 9, 2025 by Pulumi

gcp.iap.Client

Explore with Pulumi AI

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:

Example Usage

Iap Client

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const project = new gcp.organizations.Project("project", {
    projectId: "my-project",
    name: "my-project",
    orgId: "123456789",
    deletionPolicy: "DELETE",
});
const projectService = new gcp.projects.Service("project_service", {
    project: project.projectId,
    service: "iap.googleapis.com",
});
const projectBrand = new gcp.iap.Brand("project_brand", {
    supportEmail: "support@example.com",
    applicationTitle: "Cloud IAP protected Application",
    project: projectService.project,
});
const projectClient = new gcp.iap.Client("project_client", {
    displayName: "Test Client",
    brand: projectBrand.name,
});
Copy
import pulumi
import pulumi_gcp as gcp

project = gcp.organizations.Project("project",
    project_id="my-project",
    name="my-project",
    org_id="123456789",
    deletion_policy="DELETE")
project_service = gcp.projects.Service("project_service",
    project=project.project_id,
    service="iap.googleapis.com")
project_brand = gcp.iap.Brand("project_brand",
    support_email="support@example.com",
    application_title="Cloud IAP protected Application",
    project=project_service.project)
project_client = gcp.iap.Client("project_client",
    display_name="Test Client",
    brand=project_brand.name)
Copy
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/iap"
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/organizations"
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/projects"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		project, err := organizations.NewProject(ctx, "project", &organizations.ProjectArgs{
			ProjectId:      pulumi.String("my-project"),
			Name:           pulumi.String("my-project"),
			OrgId:          pulumi.String("123456789"),
			DeletionPolicy: pulumi.String("DELETE"),
		})
		if err != nil {
			return err
		}
		projectService, err := projects.NewService(ctx, "project_service", &projects.ServiceArgs{
			Project: project.ProjectId,
			Service: pulumi.String("iap.googleapis.com"),
		})
		if err != nil {
			return err
		}
		projectBrand, err := iap.NewBrand(ctx, "project_brand", &iap.BrandArgs{
			SupportEmail:     pulumi.String("support@example.com"),
			ApplicationTitle: pulumi.String("Cloud IAP protected Application"),
			Project:          projectService.Project,
		})
		if err != nil {
			return err
		}
		_, err = iap.NewClient(ctx, "project_client", &iap.ClientArgs{
			DisplayName: pulumi.String("Test Client"),
			Brand:       projectBrand.Name,
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var project = new Gcp.Organizations.Project("project", new()
    {
        ProjectId = "my-project",
        Name = "my-project",
        OrgId = "123456789",
        DeletionPolicy = "DELETE",
    });

    var projectService = new Gcp.Projects.Service("project_service", new()
    {
        Project = project.ProjectId,
        ServiceName = "iap.googleapis.com",
    });

    var projectBrand = new Gcp.Iap.Brand("project_brand", new()
    {
        SupportEmail = "support@example.com",
        ApplicationTitle = "Cloud IAP protected Application",
        Project = projectService.Project,
    });

    var projectClient = new Gcp.Iap.Client("project_client", new()
    {
        DisplayName = "Test Client",
        Brand = projectBrand.Name,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.organizations.Project;
import com.pulumi.gcp.organizations.ProjectArgs;
import com.pulumi.gcp.projects.Service;
import com.pulumi.gcp.projects.ServiceArgs;
import com.pulumi.gcp.iap.Brand;
import com.pulumi.gcp.iap.BrandArgs;
import com.pulumi.gcp.iap.Client;
import com.pulumi.gcp.iap.ClientArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var project = new Project("project", ProjectArgs.builder()
            .projectId("my-project")
            .name("my-project")
            .orgId("123456789")
            .deletionPolicy("DELETE")
            .build());

        var projectService = new Service("projectService", ServiceArgs.builder()
            .project(project.projectId())
            .service("iap.googleapis.com")
            .build());

        var projectBrand = new Brand("projectBrand", BrandArgs.builder()
            .supportEmail("support@example.com")
            .applicationTitle("Cloud IAP protected Application")
            .project(projectService.project())
            .build());

        var projectClient = new Client("projectClient", ClientArgs.builder()
            .displayName("Test Client")
            .brand(projectBrand.name())
            .build());

    }
}
Copy
resources:
  project:
    type: gcp:organizations:Project
    properties:
      projectId: my-project
      name: my-project
      orgId: '123456789'
      deletionPolicy: DELETE
  projectService:
    type: gcp:projects:Service
    name: project_service
    properties:
      project: ${project.projectId}
      service: iap.googleapis.com
  projectBrand:
    type: gcp:iap:Brand
    name: project_brand
    properties:
      supportEmail: support@example.com
      applicationTitle: Cloud IAP protected Application
      project: ${projectService.project}
  projectClient:
    type: gcp:iap:Client
    name: project_client
    properties:
      displayName: Test Client
      brand: ${projectBrand.name}
Copy

Create Client Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new Client(name: string, args: ClientArgs, opts?: CustomResourceOptions);
@overload
def Client(resource_name: str,
           args: ClientArgs,
           opts: Optional[ResourceOptions] = None)

@overload
def Client(resource_name: str,
           opts: Optional[ResourceOptions] = None,
           brand: Optional[str] = None,
           display_name: Optional[str] = None)
func NewClient(ctx *Context, name string, args ClientArgs, opts ...ResourceOption) (*Client, error)
public Client(string name, ClientArgs args, CustomResourceOptions? opts = null)
public Client(String name, ClientArgs args)
public Client(String name, ClientArgs args, CustomResourceOptions options)
type: gcp:iap:Client
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ClientArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. ClientArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. ClientArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ClientArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ClientArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var gcpClientResource = new Gcp.Iap.Client("gcpClientResource", new()
{
    Brand = "string",
    DisplayName = "string",
});
Copy
example, err := iap.NewClient(ctx, "gcpClientResource", &iap.ClientArgs{
	Brand:       pulumi.String("string"),
	DisplayName: pulumi.String("string"),
})
Copy
var gcpClientResource = new Client("gcpClientResource", ClientArgs.builder()
    .brand("string")
    .displayName("string")
    .build());
Copy
gcp_client_resource = gcp.iap.Client("gcpClientResource",
    brand="string",
    display_name="string")
Copy
const gcpClientResource = new gcp.iap.Client("gcpClientResource", {
    brand: "string",
    displayName: "string",
});
Copy
type: gcp:iap:Client
properties:
    brand: string
    displayName: string
Copy

Client Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The Client resource accepts the following input properties:

Brand
This property is required.
Changes to this property will trigger replacement.
string
Identifier of the brand to which this client is attached to. The format is projects/{project_number}/brands/{brand_id}.


DisplayName
This property is required.
Changes to this property will trigger replacement.
string
Human-friendly name given to the OAuth client.
Brand
This property is required.
Changes to this property will trigger replacement.
string
Identifier of the brand to which this client is attached to. The format is projects/{project_number}/brands/{brand_id}.


DisplayName
This property is required.
Changes to this property will trigger replacement.
string
Human-friendly name given to the OAuth client.
brand
This property is required.
Changes to this property will trigger replacement.
String
Identifier of the brand to which this client is attached to. The format is projects/{project_number}/brands/{brand_id}.


displayName
This property is required.
Changes to this property will trigger replacement.
String
Human-friendly name given to the OAuth client.
brand
This property is required.
Changes to this property will trigger replacement.
string
Identifier of the brand to which this client is attached to. The format is projects/{project_number}/brands/{brand_id}.


displayName
This property is required.
Changes to this property will trigger replacement.
string
Human-friendly name given to the OAuth client.
brand
This property is required.
Changes to this property will trigger replacement.
str
Identifier of the brand to which this client is attached to. The format is projects/{project_number}/brands/{brand_id}.


display_name
This property is required.
Changes to this property will trigger replacement.
str
Human-friendly name given to the OAuth client.
brand
This property is required.
Changes to this property will trigger replacement.
String
Identifier of the brand to which this client is attached to. The format is projects/{project_number}/brands/{brand_id}.


displayName
This property is required.
Changes to this property will trigger replacement.
String
Human-friendly name given to the OAuth client.

Outputs

All input properties are implicitly available as output properties. Additionally, the Client resource produces the following output properties:

ClientId string
Output only. Unique identifier of the OAuth client.
Id string
The provider-assigned unique ID for this managed resource.
Secret string
Output only. Client secret of the OAuth client. Note: This property is sensitive and will not be displayed in the plan.
ClientId string
Output only. Unique identifier of the OAuth client.
Id string
The provider-assigned unique ID for this managed resource.
Secret string
Output only. Client secret of the OAuth client. Note: This property is sensitive and will not be displayed in the plan.
clientId String
Output only. Unique identifier of the OAuth client.
id String
The provider-assigned unique ID for this managed resource.
secret String
Output only. Client secret of the OAuth client. Note: This property is sensitive and will not be displayed in the plan.
clientId string
Output only. Unique identifier of the OAuth client.
id string
The provider-assigned unique ID for this managed resource.
secret string
Output only. Client secret of the OAuth client. Note: This property is sensitive and will not be displayed in the plan.
client_id str
Output only. Unique identifier of the OAuth client.
id str
The provider-assigned unique ID for this managed resource.
secret str
Output only. Client secret of the OAuth client. Note: This property is sensitive and will not be displayed in the plan.
clientId String
Output only. Unique identifier of the OAuth client.
id String
The provider-assigned unique ID for this managed resource.
secret String
Output only. Client secret of the OAuth client. Note: This property is sensitive and will not be displayed in the plan.

Look up Existing Client Resource

Get an existing Client 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?: ClientState, opts?: CustomResourceOptions): Client
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        brand: Optional[str] = None,
        client_id: Optional[str] = None,
        display_name: Optional[str] = None,
        secret: Optional[str] = None) -> Client
func GetClient(ctx *Context, name string, id IDInput, state *ClientState, opts ...ResourceOption) (*Client, error)
public static Client Get(string name, Input<string> id, ClientState? state, CustomResourceOptions? opts = null)
public static Client get(String name, Output<String> id, ClientState state, CustomResourceOptions options)
resources:  _:    type: gcp:iap:Client    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
Brand Changes to this property will trigger replacement. string
Identifier of the brand to which this client is attached to. The format is projects/{project_number}/brands/{brand_id}.


ClientId string
Output only. Unique identifier of the OAuth client.
DisplayName Changes to this property will trigger replacement. string
Human-friendly name given to the OAuth client.
Secret string
Output only. Client secret of the OAuth client. Note: This property is sensitive and will not be displayed in the plan.
Brand Changes to this property will trigger replacement. string
Identifier of the brand to which this client is attached to. The format is projects/{project_number}/brands/{brand_id}.


ClientId string
Output only. Unique identifier of the OAuth client.
DisplayName Changes to this property will trigger replacement. string
Human-friendly name given to the OAuth client.
Secret string
Output only. Client secret of the OAuth client. Note: This property is sensitive and will not be displayed in the plan.
brand Changes to this property will trigger replacement. String
Identifier of the brand to which this client is attached to. The format is projects/{project_number}/brands/{brand_id}.


clientId String
Output only. Unique identifier of the OAuth client.
displayName Changes to this property will trigger replacement. String
Human-friendly name given to the OAuth client.
secret String
Output only. Client secret of the OAuth client. Note: This property is sensitive and will not be displayed in the plan.
brand Changes to this property will trigger replacement. string
Identifier of the brand to which this client is attached to. The format is projects/{project_number}/brands/{brand_id}.


clientId string
Output only. Unique identifier of the OAuth client.
displayName Changes to this property will trigger replacement. string
Human-friendly name given to the OAuth client.
secret string
Output only. Client secret of the OAuth client. Note: This property is sensitive and will not be displayed in the plan.
brand Changes to this property will trigger replacement. str
Identifier of the brand to which this client is attached to. The format is projects/{project_number}/brands/{brand_id}.


client_id str
Output only. Unique identifier of the OAuth client.
display_name Changes to this property will trigger replacement. str
Human-friendly name given to the OAuth client.
secret str
Output only. Client secret of the OAuth client. Note: This property is sensitive and will not be displayed in the plan.
brand Changes to this property will trigger replacement. String
Identifier of the brand to which this client is attached to. The format is projects/{project_number}/brands/{brand_id}.


clientId String
Output only. Unique identifier of the OAuth client.
displayName Changes to this property will trigger replacement. String
Human-friendly name given to the OAuth client.
secret String
Output only. Client secret of the OAuth client. Note: This property is sensitive and will not be displayed in the plan.

Import

Client can be imported using any of these accepted formats:

  • {{brand}}/identityAwareProxyClients/{{client_id}}

  • {{brand}}/{{client_id}}

When using the pulumi import command, Client can be imported using one of the formats above. For example:

$ pulumi import gcp:iap/client:Client default {{brand}}/identityAwareProxyClients/{{client_id}}
Copy
$ pulumi import gcp:iap/client:Client default {{brand}}/{{client_id}}
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Google Cloud (GCP) Classic pulumi/pulumi-gcp
License
Apache-2.0
Notes
This Pulumi package is based on the google-beta Terraform Provider.