Google Cloud (GCP) Classic

Pulumi Official
Package maintained by Pulumi
v6.32.0 published on Wednesday, Jul 20, 2022 by Pulumi

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:

Warning: All arguments including secret will be stored in the raw state as plain-text.

Example Usage

Iap Client

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
    public MyStack()
    {
        var project = new Gcp.Organizations.Project("project", new Gcp.Organizations.ProjectArgs
        {
            ProjectId = "tf-test",
            OrgId = "123456789",
        });
        var projectService = new Gcp.Projects.Service("projectService", new Gcp.Projects.ServiceArgs
        {
            Project = project.ProjectId,
            Service = "iap.googleapis.com",
        });
        var projectBrand = new Gcp.Iap.Brand("projectBrand", new Gcp.Iap.BrandArgs
        {
            SupportEmail = "support@example.com",
            ApplicationTitle = "Cloud IAP protected Application",
            Project = projectService.Project,
        });
        var projectClient = new Gcp.Iap.Client("projectClient", new Gcp.Iap.ClientArgs
        {
            DisplayName = "Test Client",
            Brand = projectBrand.Name,
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/iap"
	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/organizations"
	"github.com/pulumi/pulumi-gcp/sdk/v6/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("tf-test"),
			OrgId:     pulumi.String("123456789"),
		})
		if err != nil {
			return err
		}
		projectService, err := projects.NewService(ctx, "projectService", &projects.ServiceArgs{
			Project: project.ProjectId,
			Service: pulumi.String("iap.googleapis.com"),
		})
		if err != nil {
			return err
		}
		projectBrand, err := iap.NewBrand(ctx, "projectBrand", &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, "projectClient", &iap.ClientArgs{
			DisplayName: pulumi.String("Test Client"),
			Brand:       projectBrand.Name,
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

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("tf-test")
            .orgId("123456789")
            .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());

    }
}
import pulumi
import pulumi_gcp as gcp

project = gcp.organizations.Project("project",
    project_id="tf-test",
    org_id="123456789")
project_service = gcp.projects.Service("projectService",
    project=project.project_id,
    service="iap.googleapis.com")
project_brand = gcp.iap.Brand("projectBrand",
    support_email="support@example.com",
    application_title="Cloud IAP protected Application",
    project=project_service.project)
project_client = gcp.iap.Client("projectClient",
    display_name="Test Client",
    brand=project_brand.name)
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const project = new gcp.organizations.Project("project", {
    projectId: "tf-test",
    orgId: "123456789",
});
const projectService = new gcp.projects.Service("projectService", {
    project: project.projectId,
    service: "iap.googleapis.com",
});
const projectBrand = new gcp.iap.Brand("projectBrand", {
    supportEmail: "support@example.com",
    applicationTitle: "Cloud IAP protected Application",
    project: projectService.project,
});
const projectClient = new gcp.iap.Client("projectClient", {
    displayName: "Test Client",
    brand: projectBrand.name,
});
resources:
  project:
    type: gcp:organizations:Project
    properties:
      projectId: tf-test
      orgId: 123456789
  projectService:
    type: gcp:projects:Service
    properties:
      project: ${project.projectId}
      service: iap.googleapis.com
  projectBrand:
    type: gcp:iap:Brand
    properties:
      supportEmail: support@example.com
      applicationTitle: Cloud IAP protected Application
      project: ${projectService.project}
  projectClient:
    type: gcp:iap:Client
    properties:
      displayName: Test Client
      brand: ${projectBrand.name}

Create a Client Resource

new Client(name: string, args: ClientArgs, opts?: CustomResourceOptions);
@overload
def Client(resource_name: str,
           opts: Optional[ResourceOptions] = None,
           brand: Optional[str] = None,
           display_name: Optional[str] = None)
@overload
def Client(resource_name: str,
           args: ClientArgs,
           opts: Optional[ResourceOptions] = 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.

name string
The unique name of the resource.
args ClientArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args 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 string
The unique name of the resource.
args ClientArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ClientArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args ClientArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

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

The Client resource accepts the following input properties:

Brand string

Identifier of the brand to which this client is attached to. The format is projects/{project_number}/brands/{brand_id}/identityAwareProxyClients/{client_id}.

DisplayName string

Human-friendly name given to the OAuth client.

Brand string

Identifier of the brand to which this client is attached to. The format is projects/{project_number}/brands/{brand_id}/identityAwareProxyClients/{client_id}.

DisplayName string

Human-friendly name given to the OAuth client.

brand String

Identifier of the brand to which this client is attached to. The format is projects/{project_number}/brands/{brand_id}/identityAwareProxyClients/{client_id}.

displayName String

Human-friendly name given to the OAuth client.

brand string

Identifier of the brand to which this client is attached to. The format is projects/{project_number}/brands/{brand_id}/identityAwareProxyClients/{client_id}.

displayName string

Human-friendly name given to the OAuth client.

brand str

Identifier of the brand to which this client is attached to. The format is projects/{project_number}/brands/{brand_id}/identityAwareProxyClients/{client_id}.

display_name str

Human-friendly name given to the OAuth client.

brand String

Identifier of the brand to which this client is attached to. The format is projects/{project_number}/brands/{brand_id}/identityAwareProxyClients/{client_id}.

displayName 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.

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.

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.

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.

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.

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.

Look up an 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)
Resource lookup is not supported in YAML
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.
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:
Brand string

Identifier of the brand to which this client is attached to. The format is projects/{project_number}/brands/{brand_id}/identityAwareProxyClients/{client_id}.

ClientId string

Output only. Unique identifier of the OAuth client.

DisplayName string

Human-friendly name given to the OAuth client.

Secret string

Output only. Client secret of the OAuth client.

Brand string

Identifier of the brand to which this client is attached to. The format is projects/{project_number}/brands/{brand_id}/identityAwareProxyClients/{client_id}.

ClientId string

Output only. Unique identifier of the OAuth client.

DisplayName string

Human-friendly name given to the OAuth client.

Secret string

Output only. Client secret of the OAuth client.

brand String

Identifier of the brand to which this client is attached to. The format is projects/{project_number}/brands/{brand_id}/identityAwareProxyClients/{client_id}.

clientId String

Output only. Unique identifier of the OAuth client.

displayName String

Human-friendly name given to the OAuth client.

secret String

Output only. Client secret of the OAuth client.

brand string

Identifier of the brand to which this client is attached to. The format is projects/{project_number}/brands/{brand_id}/identityAwareProxyClients/{client_id}.

clientId string

Output only. Unique identifier of the OAuth client.

displayName string

Human-friendly name given to the OAuth client.

secret string

Output only. Client secret of the OAuth client.

brand str

Identifier of the brand to which this client is attached to. The format is projects/{project_number}/brands/{brand_id}/identityAwareProxyClients/{client_id}.

client_id str

Output only. Unique identifier of the OAuth client.

display_name str

Human-friendly name given to the OAuth client.

secret str

Output only. Client secret of the OAuth client.

brand String

Identifier of the brand to which this client is attached to. The format is projects/{project_number}/brands/{brand_id}/identityAwareProxyClients/{client_id}.

clientId String

Output only. Unique identifier of the OAuth client.

displayName String

Human-friendly name given to the OAuth client.

secret String

Output only. Client secret of the OAuth client.

Import

Client can be imported using any of these accepted formats

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

Package Details

Repository
https://github.com/pulumi/pulumi-gcp
License
Apache-2.0
Notes

This Pulumi package is based on the google-beta Terraform Provider.