published on Thursday, May 7, 2026 by Pulumi
published on Thursday, May 7, 2026 by Pulumi
Sets the root agent of a CES App after both the app and the agent have been created.
Because a CES Agent must reference its parent app at creation time, the app must exist before any agent can be created. This means the root agent cannot be set on the app at creation time — use this resource to set it afterwards.
Note: This resource modifies the
rootAgentfield on the parentgcp.ces.App. Addlifecycle { ignoreChanges = [rootAgent] }to yourgcp.ces.Appresource to prevent Terraform from detecting drift and clearing the field on every plan.
Example Usage
Ces App Root Agent Association Basic
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const app = new gcp.ces.App("app", {
location: "eu",
appId: "app-id",
displayName: "Example App app-id",
languageSettings: {
defaultLanguageCode: "en-US",
supportedLanguageCodes: ["es-ES"],
fallbackAction: "escalate",
},
timeZoneSettings: {
timeZone: "America/Los_Angeles",
},
});
const agent = new gcp.ces.Agent("agent", {
location: app.location,
app: app.appId,
agentId: "agent-id",
displayName: "Example Agent",
instruction: "You are a helpful assistant.",
llmAgent: {},
});
const association = new gcp.ces.AppRootAgentAssociation("association", {
location: app.location,
appId: app.appId,
agentId: agent.agentId,
});
import pulumi
import pulumi_gcp as gcp
app = gcp.ces.App("app",
location="eu",
app_id="app-id",
display_name="Example App app-id",
language_settings={
"default_language_code": "en-US",
"supported_language_codes": ["es-ES"],
"fallback_action": "escalate",
},
time_zone_settings={
"time_zone": "America/Los_Angeles",
})
agent = gcp.ces.Agent("agent",
location=app.location,
app=app.app_id,
agent_id="agent-id",
display_name="Example Agent",
instruction="You are a helpful assistant.",
llm_agent={})
association = gcp.ces.AppRootAgentAssociation("association",
location=app.location,
app_id=app.app_id,
agent_id=agent.agent_id)
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/ces"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
app, err := ces.NewApp(ctx, "app", &ces.AppArgs{
Location: pulumi.String("eu"),
AppId: pulumi.String("app-id"),
DisplayName: pulumi.String("Example App app-id"),
LanguageSettings: &ces.AppLanguageSettingsArgs{
DefaultLanguageCode: pulumi.String("en-US"),
SupportedLanguageCodes: pulumi.StringArray{
pulumi.String("es-ES"),
},
FallbackAction: pulumi.String("escalate"),
},
TimeZoneSettings: &ces.AppTimeZoneSettingsArgs{
TimeZone: pulumi.String("America/Los_Angeles"),
},
})
if err != nil {
return err
}
agent, err := ces.NewAgent(ctx, "agent", &ces.AgentArgs{
Location: app.Location,
App: app.AppId,
AgentId: pulumi.String("agent-id"),
DisplayName: pulumi.String("Example Agent"),
Instruction: pulumi.String("You are a helpful assistant."),
LlmAgent: &ces.AgentLlmAgentArgs{},
})
if err != nil {
return err
}
_, err = ces.NewAppRootAgentAssociation(ctx, "association", &ces.AppRootAgentAssociationArgs{
Location: app.Location,
AppId: app.AppId,
AgentId: agent.AgentId,
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var app = new Gcp.Ces.App("app", new()
{
Location = "eu",
AppId = "app-id",
DisplayName = "Example App app-id",
LanguageSettings = new Gcp.Ces.Inputs.AppLanguageSettingsArgs
{
DefaultLanguageCode = "en-US",
SupportedLanguageCodes = new[]
{
"es-ES",
},
FallbackAction = "escalate",
},
TimeZoneSettings = new Gcp.Ces.Inputs.AppTimeZoneSettingsArgs
{
TimeZone = "America/Los_Angeles",
},
});
var agent = new Gcp.Ces.Agent("agent", new()
{
Location = app.Location,
App = app.AppId,
AgentId = "agent-id",
DisplayName = "Example Agent",
Instruction = "You are a helpful assistant.",
LlmAgent = null,
});
var association = new Gcp.Ces.AppRootAgentAssociation("association", new()
{
Location = app.Location,
AppId = app.AppId,
AgentId = agent.AgentId,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.ces.App;
import com.pulumi.gcp.ces.AppArgs;
import com.pulumi.gcp.ces.inputs.AppLanguageSettingsArgs;
import com.pulumi.gcp.ces.inputs.AppTimeZoneSettingsArgs;
import com.pulumi.gcp.ces.Agent;
import com.pulumi.gcp.ces.AgentArgs;
import com.pulumi.gcp.ces.inputs.AgentLlmAgentArgs;
import com.pulumi.gcp.ces.AppRootAgentAssociation;
import com.pulumi.gcp.ces.AppRootAgentAssociationArgs;
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 app = new App("app", AppArgs.builder()
.location("eu")
.appId("app-id")
.displayName("Example App app-id")
.languageSettings(AppLanguageSettingsArgs.builder()
.defaultLanguageCode("en-US")
.supportedLanguageCodes("es-ES")
.fallbackAction("escalate")
.build())
.timeZoneSettings(AppTimeZoneSettingsArgs.builder()
.timeZone("America/Los_Angeles")
.build())
.build());
var agent = new Agent("agent", AgentArgs.builder()
.location(app.location())
.app(app.appId())
.agentId("agent-id")
.displayName("Example Agent")
.instruction("You are a helpful assistant.")
.llmAgent(AgentLlmAgentArgs.builder()
.build())
.build());
var association = new AppRootAgentAssociation("association", AppRootAgentAssociationArgs.builder()
.location(app.location())
.appId(app.appId())
.agentId(agent.agentId())
.build());
}
}
resources:
app:
type: gcp:ces:App
properties:
location: eu
appId: app-id
displayName: Example App app-id
languageSettings:
defaultLanguageCode: en-US
supportedLanguageCodes:
- es-ES
fallbackAction: escalate
timeZoneSettings:
timeZone: America/Los_Angeles
agent:
type: gcp:ces:Agent
properties:
location: ${app.location}
app: ${app.appId}
agentId: agent-id
displayName: Example Agent
instruction: You are a helpful assistant.
llmAgent: {}
association:
type: gcp:ces:AppRootAgentAssociation
properties:
location: ${app.location}
appId: ${app.appId}
agentId: ${agent.agentId}
Example coming soon!
Create AppRootAgentAssociation Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AppRootAgentAssociation(name: string, args: AppRootAgentAssociationArgs, opts?: CustomResourceOptions);@overload
def AppRootAgentAssociation(resource_name: str,
args: AppRootAgentAssociationArgs,
opts: Optional[ResourceOptions] = None)
@overload
def AppRootAgentAssociation(resource_name: str,
opts: Optional[ResourceOptions] = None,
agent_id: Optional[str] = None,
app_id: Optional[str] = None,
location: Optional[str] = None,
project: Optional[str] = None)func NewAppRootAgentAssociation(ctx *Context, name string, args AppRootAgentAssociationArgs, opts ...ResourceOption) (*AppRootAgentAssociation, error)public AppRootAgentAssociation(string name, AppRootAgentAssociationArgs args, CustomResourceOptions? opts = null)
public AppRootAgentAssociation(String name, AppRootAgentAssociationArgs args)
public AppRootAgentAssociation(String name, AppRootAgentAssociationArgs args, CustomResourceOptions options)
type: gcp:ces:AppRootAgentAssociation
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "gcp_ces_approotagentassociation" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args AppRootAgentAssociationArgs
- 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 AppRootAgentAssociationArgs
- 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 AppRootAgentAssociationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AppRootAgentAssociationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AppRootAgentAssociationArgs
- 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 appRootAgentAssociationResource = new Gcp.Ces.AppRootAgentAssociation("appRootAgentAssociationResource", new()
{
AgentId = "string",
AppId = "string",
Location = "string",
Project = "string",
});
example, err := ces.NewAppRootAgentAssociation(ctx, "appRootAgentAssociationResource", &ces.AppRootAgentAssociationArgs{
AgentId: pulumi.String("string"),
AppId: pulumi.String("string"),
Location: pulumi.String("string"),
Project: pulumi.String("string"),
})
resource "gcp_ces_approotagentassociation" "appRootAgentAssociationResource" {
agent_id = "string"
app_id = "string"
location = "string"
project = "string"
}
var appRootAgentAssociationResource = new AppRootAgentAssociation("appRootAgentAssociationResource", AppRootAgentAssociationArgs.builder()
.agentId("string")
.appId("string")
.location("string")
.project("string")
.build());
app_root_agent_association_resource = gcp.ces.AppRootAgentAssociation("appRootAgentAssociationResource",
agent_id="string",
app_id="string",
location="string",
project="string")
const appRootAgentAssociationResource = new gcp.ces.AppRootAgentAssociation("appRootAgentAssociationResource", {
agentId: "string",
appId: "string",
location: "string",
project: "string",
});
type: gcp:ces:AppRootAgentAssociation
properties:
agentId: string
appId: string
location: string
project: string
AppRootAgentAssociation 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 AppRootAgentAssociation resource accepts the following input properties:
- Agent
Id string - The ID or fully qualified resource name of the agent to associate as the root agent of the app.
- App
Id string - The ID of the App. Used to construct the app resource name.
- Location string
- The location of the App.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Agent
Id string - The ID or fully qualified resource name of the agent to associate as the root agent of the app.
- App
Id string - The ID of the App. Used to construct the app resource name.
- Location string
- The location of the App.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- agent_
id string - The ID or fully qualified resource name of the agent to associate as the root agent of the app.
- app_
id string - The ID of the App. Used to construct the app resource name.
- location string
- The location of the App.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- agent
Id String - The ID or fully qualified resource name of the agent to associate as the root agent of the app.
- app
Id String - The ID of the App. Used to construct the app resource name.
- location String
- The location of the App.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- agent
Id string - The ID or fully qualified resource name of the agent to associate as the root agent of the app.
- app
Id string - The ID of the App. Used to construct the app resource name.
- location string
- The location of the App.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- agent_
id str - The ID or fully qualified resource name of the agent to associate as the root agent of the app.
- app_
id str - The ID of the App. Used to construct the app resource name.
- location str
- The location of the App.
- project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- agent
Id String - The ID or fully qualified resource name of the agent to associate as the root agent of the app.
- app
Id String - The ID of the App. Used to construct the app resource name.
- location String
- The location of the App.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
Outputs
All input properties are implicitly available as output properties. Additionally, the AppRootAgentAssociation resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing AppRootAgentAssociation Resource
Get an existing AppRootAgentAssociation 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?: AppRootAgentAssociationState, opts?: CustomResourceOptions): AppRootAgentAssociation@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
agent_id: Optional[str] = None,
app_id: Optional[str] = None,
location: Optional[str] = None,
project: Optional[str] = None) -> AppRootAgentAssociationfunc GetAppRootAgentAssociation(ctx *Context, name string, id IDInput, state *AppRootAgentAssociationState, opts ...ResourceOption) (*AppRootAgentAssociation, error)public static AppRootAgentAssociation Get(string name, Input<string> id, AppRootAgentAssociationState? state, CustomResourceOptions? opts = null)public static AppRootAgentAssociation get(String name, Output<String> id, AppRootAgentAssociationState state, CustomResourceOptions options)resources: _: type: gcp:ces:AppRootAgentAssociation get: id: ${id}import {
to = gcp_ces_approotagentassociation.example
id = "${id}"
}
- 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.
- Agent
Id string - The ID or fully qualified resource name of the agent to associate as the root agent of the app.
- App
Id string - The ID of the App. Used to construct the app resource name.
- Location string
- The location of the App.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Agent
Id string - The ID or fully qualified resource name of the agent to associate as the root agent of the app.
- App
Id string - The ID of the App. Used to construct the app resource name.
- Location string
- The location of the App.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- agent_
id string - The ID or fully qualified resource name of the agent to associate as the root agent of the app.
- app_
id string - The ID of the App. Used to construct the app resource name.
- location string
- The location of the App.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- agent
Id String - The ID or fully qualified resource name of the agent to associate as the root agent of the app.
- app
Id String - The ID of the App. Used to construct the app resource name.
- location String
- The location of the App.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- agent
Id string - The ID or fully qualified resource name of the agent to associate as the root agent of the app.
- app
Id string - The ID of the App. Used to construct the app resource name.
- location string
- The location of the App.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- agent_
id str - The ID or fully qualified resource name of the agent to associate as the root agent of the app.
- app_
id str - The ID of the App. Used to construct the app resource name.
- location str
- The location of the App.
- project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- agent
Id String - The ID or fully qualified resource name of the agent to associate as the root agent of the app.
- app
Id String - The ID of the App. Used to construct the app resource name.
- location String
- The location of the App.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
Import
AppRootAgentAssociation can be imported using any of these accepted formats:
projects/{{project}}/locations/{{location}}/apps/{{app_id}}/agents/{{agent_id}}{{project}}/{{location}}/{{app_id}}/{{agent_id}}{{location}}/{{app_id}}/{{agent_id}}
When using the pulumi import command, AppRootAgentAssociation can be imported using one of the formats above. For example:
$ pulumi import gcp:ces/appRootAgentAssociation:AppRootAgentAssociation default projects/{{project}}/locations/{{location}}/apps/{{app_id}}/agents/{{agent_id}}
$ pulumi import gcp:ces/appRootAgentAssociation:AppRootAgentAssociation default {{project}}/{{location}}/{{app_id}}/{{agent_id}}
$ pulumi import gcp:ces/appRootAgentAssociation:AppRootAgentAssociation default {{location}}/{{app_id}}/{{agent_id}}
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-betaTerraform Provider.
published on Thursday, May 7, 2026 by Pulumi
