Client

class Client : KotlinCustomResource

Application Integration Client. To get more information about Client, see:

Example Usage

Integrations Client Basic

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const example = new gcp.applicationintegration.Client("example", {location: "us-central1"});
import pulumi
import pulumi_gcp as gcp
example = gcp.applicationintegration.Client("example", location="us-central1")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var example = new Gcp.ApplicationIntegration.Client("example", new()
{
Location = "us-central1",
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/applicationintegration"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := applicationintegration.NewClient(ctx, "example", &applicationintegration.ClientArgs{
Location: pulumi.String("us-central1"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.applicationintegration.Client;
import com.pulumi.gcp.applicationintegration.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 example = new Client("example", ClientArgs.builder()
.location("us-central1")
.build());
}
}
resources:
example:
type: gcp:applicationintegration:Client
properties:
location: us-central1

Integrations Client Full

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const testProject = gcp.organizations.getProject({});
const keyring = new gcp.kms.KeyRing("keyring", {
name: "my-keyring",
location: "us-east1",
});
const cryptokey = new gcp.kms.CryptoKey("cryptokey", {
name: "crypto-key-example",
keyRing: keyring.id,
rotationPeriod: "7776000s",
});
const testKey = new gcp.kms.CryptoKeyVersion("test_key", {cryptoKey: cryptokey.id});
const serviceAccount = new gcp.serviceaccount.Account("service_account", {
accountId: "service-acc",
displayName: "Service Account",
});
const example = new gcp.applicationintegration.Client("example", {
location: "us-east1",
createSampleIntegrations: true,
runAsServiceAccount: serviceAccount.email,
cloudKmsConfig: {
kmsLocation: "us-east1",
kmsRing: keyring.id,
key: cryptokey.id,
keyVersion: testKey.id,
kmsProjectId: testProject.then(testProject => testProject.projectId),
},
});
import pulumi
import pulumi_gcp as gcp
test_project = gcp.organizations.get_project()
keyring = gcp.kms.KeyRing("keyring",
name="my-keyring",
location="us-east1")
cryptokey = gcp.kms.CryptoKey("cryptokey",
name="crypto-key-example",
key_ring=keyring.id,
rotation_period="7776000s")
test_key = gcp.kms.CryptoKeyVersion("test_key", crypto_key=cryptokey.id)
service_account = gcp.serviceaccount.Account("service_account",
account_id="service-acc",
display_name="Service Account")
example = gcp.applicationintegration.Client("example",
location="us-east1",
create_sample_integrations=True,
run_as_service_account=service_account.email,
cloud_kms_config={
"kms_location": "us-east1",
"kms_ring": keyring.id,
"key": cryptokey.id,
"key_version": test_key.id,
"kms_project_id": test_project.project_id,
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var testProject = Gcp.Organizations.GetProject.Invoke();
var keyring = new Gcp.Kms.KeyRing("keyring", new()
{
Name = "my-keyring",
Location = "us-east1",
});
var cryptokey = new Gcp.Kms.CryptoKey("cryptokey", new()
{
Name = "crypto-key-example",
KeyRing = keyring.Id,
RotationPeriod = "7776000s",
});
var testKey = new Gcp.Kms.CryptoKeyVersion("test_key", new()
{
CryptoKey = cryptokey.Id,
});
var serviceAccount = new Gcp.ServiceAccount.Account("service_account", new()
{
AccountId = "service-acc",
DisplayName = "Service Account",
});
var example = new Gcp.ApplicationIntegration.Client("example", new()
{
Location = "us-east1",
CreateSampleIntegrations = true,
RunAsServiceAccount = serviceAccount.Email,
CloudKmsConfig = new Gcp.ApplicationIntegration.Inputs.ClientCloudKmsConfigArgs
{
KmsLocation = "us-east1",
KmsRing = keyring.Id,
Key = cryptokey.Id,
KeyVersion = testKey.Id,
KmsProjectId = testProject.Apply(getProjectResult => getProjectResult.ProjectId),
},
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/applicationintegration"
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/kms"
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/organizations"
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/serviceaccount"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
testProject, err := organizations.LookupProject(ctx, nil, nil)
if err != nil {
return err
}
keyring, err := kms.NewKeyRing(ctx, "keyring", &kms.KeyRingArgs{
Name: pulumi.String("my-keyring"),
Location: pulumi.String("us-east1"),
})
if err != nil {
return err
}
cryptokey, err := kms.NewCryptoKey(ctx, "cryptokey", &kms.CryptoKeyArgs{
Name: pulumi.String("crypto-key-example"),
KeyRing: keyring.ID(),
RotationPeriod: pulumi.String("7776000s"),
})
if err != nil {
return err
}
testKey, err := kms.NewCryptoKeyVersion(ctx, "test_key", &kms.CryptoKeyVersionArgs{
CryptoKey: cryptokey.ID(),
})
if err != nil {
return err
}
serviceAccount, err := serviceaccount.NewAccount(ctx, "service_account", &serviceaccount.AccountArgs{
AccountId: pulumi.String("service-acc"),
DisplayName: pulumi.String("Service Account"),
})
if err != nil {
return err
}
_, err = applicationintegration.NewClient(ctx, "example", &applicationintegration.ClientArgs{
Location: pulumi.String("us-east1"),
CreateSampleIntegrations: pulumi.Bool(true),
RunAsServiceAccount: serviceAccount.Email,
CloudKmsConfig: &applicationintegration.ClientCloudKmsConfigArgs{
KmsLocation: pulumi.String("us-east1"),
KmsRing: keyring.ID(),
Key: cryptokey.ID(),
KeyVersion: testKey.ID(),
KmsProjectId: pulumi.String(testProject.ProjectId),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.organizations.OrganizationsFunctions;
import com.pulumi.gcp.organizations.inputs.GetProjectArgs;
import com.pulumi.gcp.kms.KeyRing;
import com.pulumi.gcp.kms.KeyRingArgs;
import com.pulumi.gcp.kms.CryptoKey;
import com.pulumi.gcp.kms.CryptoKeyArgs;
import com.pulumi.gcp.kms.CryptoKeyVersion;
import com.pulumi.gcp.kms.CryptoKeyVersionArgs;
import com.pulumi.gcp.serviceaccount.Account;
import com.pulumi.gcp.serviceaccount.AccountArgs;
import com.pulumi.gcp.applicationintegration.Client;
import com.pulumi.gcp.applicationintegration.ClientArgs;
import com.pulumi.gcp.applicationintegration.inputs.ClientCloudKmsConfigArgs;
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) {
final var testProject = OrganizationsFunctions.getProject();
var keyring = new KeyRing("keyring", KeyRingArgs.builder()
.name("my-keyring")
.location("us-east1")
.build());
var cryptokey = new CryptoKey("cryptokey", CryptoKeyArgs.builder()
.name("crypto-key-example")
.keyRing(keyring.id())
.rotationPeriod("7776000s")
.build());
var testKey = new CryptoKeyVersion("testKey", CryptoKeyVersionArgs.builder()
.cryptoKey(cryptokey.id())
.build());
var serviceAccount = new Account("serviceAccount", AccountArgs.builder()
.accountId("service-acc")
.displayName("Service Account")
.build());
var example = new Client("example", ClientArgs.builder()
.location("us-east1")
.createSampleIntegrations(true)
.runAsServiceAccount(serviceAccount.email())
.cloudKmsConfig(ClientCloudKmsConfigArgs.builder()
.kmsLocation("us-east1")
.kmsRing(keyring.id())
.key(cryptokey.id())
.keyVersion(testKey.id())
.kmsProjectId(testProject.applyValue(getProjectResult -> getProjectResult.projectId()))
.build())
.build());
}
}
resources:
keyring:
type: gcp:kms:KeyRing
properties:
name: my-keyring
location: us-east1
cryptokey:
type: gcp:kms:CryptoKey
properties:
name: crypto-key-example
keyRing: ${keyring.id}
rotationPeriod: 7776000s
testKey:
type: gcp:kms:CryptoKeyVersion
name: test_key
properties:
cryptoKey: ${cryptokey.id}
serviceAccount:
type: gcp:serviceaccount:Account
name: service_account
properties:
accountId: service-acc
displayName: Service Account
example:
type: gcp:applicationintegration:Client
properties:
location: us-east1
createSampleIntegrations: true
runAsServiceAccount: ${serviceAccount.email}
cloudKmsConfig:
kmsLocation: us-east1
kmsRing: ${keyring.id}
key: ${cryptokey.id}
keyVersion: ${testKey.id}
kmsProjectId: ${testProject.projectId}
variables:
testProject:
fn::invoke:
Function: gcp:organizations:getProject
Arguments: {}

Import

Client can be imported using any of these accepted formats:

  • projects/{{project}}/locations/{{location}}/clients

  • {{project}}/{{location}}

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

$ pulumi import gcp:applicationintegration/client:Client default projects/{{project}}/locations/{{location}}/clients
$ pulumi import gcp:applicationintegration/client:Client default {{project}}/{{location}}
$ pulumi import gcp:applicationintegration/client:Client default {{location}}

Properties

Link copied to clipboard

Cloud KMS config for AuthModule to encrypt/decrypt credentials. Structure is documented below.

Link copied to clipboard

Indicates if sample integrations should be created along with provisioning.

Link copied to clipboard

(Optional, Deprecated) Indicates if sample workflow should be created along with provisioning.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val location: Output<String>

Location in which client needs to be provisioned.

Link copied to clipboard
val project: Output<String>

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Link copied to clipboard
val provisionGmek: Output<Boolean>?

(Optional, Deprecated) Indicates provision with GMEK or CMEK.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

User input run-as service account, if empty, will bring up a new default service account.

Link copied to clipboard
val urn: Output<String>