1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. firebase
  5. AiLogicPromptTemplate
Google Cloud v9.11.0 published on Tuesday, Feb 3, 2026 by Pulumi
gcp logo
Google Cloud v9.11.0 published on Tuesday, Feb 3, 2026 by Pulumi

    The PromptTemplate resource for Firebase AI Logic.

    To get more information about PromptTemplate, see:

    Example Usage

    Firebaseailogic Prompt Template Basic

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const basic = new gcp.firebase.AiLogicPromptTemplate("basic", {
        location: "global",
        templateId: "basic-template",
        templateString: `---
    model: gemini-2.5-flash
    ---
    Hello world!
    `,
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    basic = gcp.firebase.AiLogicPromptTemplate("basic",
        location="global",
        template_id="basic-template",
        template_string="""---
    model: gemini-2.5-flash
    ---
    Hello world!
    """)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/firebase"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := firebase.NewAiLogicPromptTemplate(ctx, "basic", &firebase.AiLogicPromptTemplateArgs{
    			Location:       pulumi.String("global"),
    			TemplateId:     pulumi.String("basic-template"),
    			TemplateString: pulumi.String("---\nmodel: gemini-2.5-flash\n---\nHello world!\n"),
    		})
    		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 basic = new Gcp.Firebase.AiLogicPromptTemplate("basic", new()
        {
            Location = "global",
            TemplateId = "basic-template",
            TemplateString = @"---
    model: gemini-2.5-flash
    ---
    Hello world!
    ",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.firebase.AiLogicPromptTemplate;
    import com.pulumi.gcp.firebase.AiLogicPromptTemplateArgs;
    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 basic = new AiLogicPromptTemplate("basic", AiLogicPromptTemplateArgs.builder()
                .location("global")
                .templateId("basic-template")
                .templateString("""
    ---
    model: gemini-2.5-flash
    ---
    Hello world!
                """)
                .build());
    
        }
    }
    
    resources:
      basic:
        type: gcp:firebase:AiLogicPromptTemplate
        properties:
          location: global
          templateId: basic-template
          templateString: |
            ---
            model: gemini-2.5-flash
            ---
            Hello world!        
    

    Create AiLogicPromptTemplate Resource

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

    Constructor syntax

    new AiLogicPromptTemplate(name: string, args: AiLogicPromptTemplateArgs, opts?: CustomResourceOptions);
    @overload
    def AiLogicPromptTemplate(resource_name: str,
                              args: AiLogicPromptTemplateArgs,
                              opts: Optional[ResourceOptions] = None)
    
    @overload
    def AiLogicPromptTemplate(resource_name: str,
                              opts: Optional[ResourceOptions] = None,
                              location: Optional[str] = None,
                              template_id: Optional[str] = None,
                              template_string: Optional[str] = None,
                              display_name: Optional[str] = None,
                              project: Optional[str] = None)
    func NewAiLogicPromptTemplate(ctx *Context, name string, args AiLogicPromptTemplateArgs, opts ...ResourceOption) (*AiLogicPromptTemplate, error)
    public AiLogicPromptTemplate(string name, AiLogicPromptTemplateArgs args, CustomResourceOptions? opts = null)
    public AiLogicPromptTemplate(String name, AiLogicPromptTemplateArgs args)
    public AiLogicPromptTemplate(String name, AiLogicPromptTemplateArgs args, CustomResourceOptions options)
    
    type: gcp:firebase:AiLogicPromptTemplate
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args AiLogicPromptTemplateArgs
    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 AiLogicPromptTemplateArgs
    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 AiLogicPromptTemplateArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AiLogicPromptTemplateArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AiLogicPromptTemplateArgs
    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 aiLogicPromptTemplateResource = new Gcp.Firebase.AiLogicPromptTemplate("aiLogicPromptTemplateResource", new()
    {
        Location = "string",
        TemplateId = "string",
        TemplateString = "string",
        DisplayName = "string",
        Project = "string",
    });
    
    example, err := firebase.NewAiLogicPromptTemplate(ctx, "aiLogicPromptTemplateResource", &firebase.AiLogicPromptTemplateArgs{
    	Location:       pulumi.String("string"),
    	TemplateId:     pulumi.String("string"),
    	TemplateString: pulumi.String("string"),
    	DisplayName:    pulumi.String("string"),
    	Project:        pulumi.String("string"),
    })
    
    var aiLogicPromptTemplateResource = new AiLogicPromptTemplate("aiLogicPromptTemplateResource", AiLogicPromptTemplateArgs.builder()
        .location("string")
        .templateId("string")
        .templateString("string")
        .displayName("string")
        .project("string")
        .build());
    
    ai_logic_prompt_template_resource = gcp.firebase.AiLogicPromptTemplate("aiLogicPromptTemplateResource",
        location="string",
        template_id="string",
        template_string="string",
        display_name="string",
        project="string")
    
    const aiLogicPromptTemplateResource = new gcp.firebase.AiLogicPromptTemplate("aiLogicPromptTemplateResource", {
        location: "string",
        templateId: "string",
        templateString: "string",
        displayName: "string",
        project: "string",
    });
    
    type: gcp:firebase:AiLogicPromptTemplate
    properties:
        displayName: string
        location: string
        project: string
        templateId: string
        templateString: string
    

    AiLogicPromptTemplate 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 AiLogicPromptTemplate resource accepts the following input properties:

    Location string
    Resource ID segment making up resource name. It identifies the resource within its parent collection as described in https://google.aip.dev/122.
    TemplateId string
    The unique ID of the PromptTemplate, which is the final component of the PromptTemplate's resource name.
    TemplateString string
    The DotPrompt raw template string.
    DisplayName string
    The display name of the PromptTemplate.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    Location string
    Resource ID segment making up resource name. It identifies the resource within its parent collection as described in https://google.aip.dev/122.
    TemplateId string
    The unique ID of the PromptTemplate, which is the final component of the PromptTemplate's resource name.
    TemplateString string
    The DotPrompt raw template string.
    DisplayName string
    The display name of the PromptTemplate.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    location String
    Resource ID segment making up resource name. It identifies the resource within its parent collection as described in https://google.aip.dev/122.
    templateId String
    The unique ID of the PromptTemplate, which is the final component of the PromptTemplate's resource name.
    templateString String
    The DotPrompt raw template string.
    displayName String
    The display name of the PromptTemplate.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    location string
    Resource ID segment making up resource name. It identifies the resource within its parent collection as described in https://google.aip.dev/122.
    templateId string
    The unique ID of the PromptTemplate, which is the final component of the PromptTemplate's resource name.
    templateString string
    The DotPrompt raw template string.
    displayName string
    The display name of the PromptTemplate.
    project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    location str
    Resource ID segment making up resource name. It identifies the resource within its parent collection as described in https://google.aip.dev/122.
    template_id str
    The unique ID of the PromptTemplate, which is the final component of the PromptTemplate's resource name.
    template_string str
    The DotPrompt raw template string.
    display_name str
    The display name of the PromptTemplate.
    project str
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    location String
    Resource ID segment making up resource name. It identifies the resource within its parent collection as described in https://google.aip.dev/122.
    templateId String
    The unique ID of the PromptTemplate, which is the final component of the PromptTemplate's resource name.
    templateString String
    The DotPrompt raw template string.
    displayName String
    The display name of the PromptTemplate.
    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 AiLogicPromptTemplate resource produces the following output properties:

    CreateTime string
    Timestamp when the PromptTemplate was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    Locked bool
    Indicates if the PromptTemplate has been locked for mutations. It is strongly recommended that PromptTemplates used in production Apps be locked to avoid accidental distruption to live apps. To modify a PromptTemplate that has been locked, a call to ModifyLock with lock=false is required first.
    Model string
    The model name parsed from the template_string.
    Name string
    Identifier. The resource name of the PromptTemplate. Format: projects/{project}/locations/{location}/templates/{prompt_template}
    StateChangeTime string
    Timestamp when the PromptTemplate state was last changed.
    UpdateTime string
    Timestamp when the PromptTemplate was last updated.
    CreateTime string
    Timestamp when the PromptTemplate was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    Locked bool
    Indicates if the PromptTemplate has been locked for mutations. It is strongly recommended that PromptTemplates used in production Apps be locked to avoid accidental distruption to live apps. To modify a PromptTemplate that has been locked, a call to ModifyLock with lock=false is required first.
    Model string
    The model name parsed from the template_string.
    Name string
    Identifier. The resource name of the PromptTemplate. Format: projects/{project}/locations/{location}/templates/{prompt_template}
    StateChangeTime string
    Timestamp when the PromptTemplate state was last changed.
    UpdateTime string
    Timestamp when the PromptTemplate was last updated.
    createTime String
    Timestamp when the PromptTemplate was created.
    id String
    The provider-assigned unique ID for this managed resource.
    locked Boolean
    Indicates if the PromptTemplate has been locked for mutations. It is strongly recommended that PromptTemplates used in production Apps be locked to avoid accidental distruption to live apps. To modify a PromptTemplate that has been locked, a call to ModifyLock with lock=false is required first.
    model String
    The model name parsed from the template_string.
    name String
    Identifier. The resource name of the PromptTemplate. Format: projects/{project}/locations/{location}/templates/{prompt_template}
    stateChangeTime String
    Timestamp when the PromptTemplate state was last changed.
    updateTime String
    Timestamp when the PromptTemplate was last updated.
    createTime string
    Timestamp when the PromptTemplate was created.
    id string
    The provider-assigned unique ID for this managed resource.
    locked boolean
    Indicates if the PromptTemplate has been locked for mutations. It is strongly recommended that PromptTemplates used in production Apps be locked to avoid accidental distruption to live apps. To modify a PromptTemplate that has been locked, a call to ModifyLock with lock=false is required first.
    model string
    The model name parsed from the template_string.
    name string
    Identifier. The resource name of the PromptTemplate. Format: projects/{project}/locations/{location}/templates/{prompt_template}
    stateChangeTime string
    Timestamp when the PromptTemplate state was last changed.
    updateTime string
    Timestamp when the PromptTemplate was last updated.
    create_time str
    Timestamp when the PromptTemplate was created.
    id str
    The provider-assigned unique ID for this managed resource.
    locked bool
    Indicates if the PromptTemplate has been locked for mutations. It is strongly recommended that PromptTemplates used in production Apps be locked to avoid accidental distruption to live apps. To modify a PromptTemplate that has been locked, a call to ModifyLock with lock=false is required first.
    model str
    The model name parsed from the template_string.
    name str
    Identifier. The resource name of the PromptTemplate. Format: projects/{project}/locations/{location}/templates/{prompt_template}
    state_change_time str
    Timestamp when the PromptTemplate state was last changed.
    update_time str
    Timestamp when the PromptTemplate was last updated.
    createTime String
    Timestamp when the PromptTemplate was created.
    id String
    The provider-assigned unique ID for this managed resource.
    locked Boolean
    Indicates if the PromptTemplate has been locked for mutations. It is strongly recommended that PromptTemplates used in production Apps be locked to avoid accidental distruption to live apps. To modify a PromptTemplate that has been locked, a call to ModifyLock with lock=false is required first.
    model String
    The model name parsed from the template_string.
    name String
    Identifier. The resource name of the PromptTemplate. Format: projects/{project}/locations/{location}/templates/{prompt_template}
    stateChangeTime String
    Timestamp when the PromptTemplate state was last changed.
    updateTime String
    Timestamp when the PromptTemplate was last updated.

    Look up Existing AiLogicPromptTemplate Resource

    Get an existing AiLogicPromptTemplate 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?: AiLogicPromptTemplateState, opts?: CustomResourceOptions): AiLogicPromptTemplate
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            create_time: Optional[str] = None,
            display_name: Optional[str] = None,
            location: Optional[str] = None,
            locked: Optional[bool] = None,
            model: Optional[str] = None,
            name: Optional[str] = None,
            project: Optional[str] = None,
            state_change_time: Optional[str] = None,
            template_id: Optional[str] = None,
            template_string: Optional[str] = None,
            update_time: Optional[str] = None) -> AiLogicPromptTemplate
    func GetAiLogicPromptTemplate(ctx *Context, name string, id IDInput, state *AiLogicPromptTemplateState, opts ...ResourceOption) (*AiLogicPromptTemplate, error)
    public static AiLogicPromptTemplate Get(string name, Input<string> id, AiLogicPromptTemplateState? state, CustomResourceOptions? opts = null)
    public static AiLogicPromptTemplate get(String name, Output<String> id, AiLogicPromptTemplateState state, CustomResourceOptions options)
    resources:  _:    type: gcp:firebase:AiLogicPromptTemplate    get:      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.
    The following state arguments are supported:
    CreateTime string
    Timestamp when the PromptTemplate was created.
    DisplayName string
    The display name of the PromptTemplate.
    Location string
    Resource ID segment making up resource name. It identifies the resource within its parent collection as described in https://google.aip.dev/122.
    Locked bool
    Indicates if the PromptTemplate has been locked for mutations. It is strongly recommended that PromptTemplates used in production Apps be locked to avoid accidental distruption to live apps. To modify a PromptTemplate that has been locked, a call to ModifyLock with lock=false is required first.
    Model string
    The model name parsed from the template_string.
    Name string
    Identifier. The resource name of the PromptTemplate. Format: projects/{project}/locations/{location}/templates/{prompt_template}
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    StateChangeTime string
    Timestamp when the PromptTemplate state was last changed.
    TemplateId string
    The unique ID of the PromptTemplate, which is the final component of the PromptTemplate's resource name.
    TemplateString string
    The DotPrompt raw template string.
    UpdateTime string
    Timestamp when the PromptTemplate was last updated.
    CreateTime string
    Timestamp when the PromptTemplate was created.
    DisplayName string
    The display name of the PromptTemplate.
    Location string
    Resource ID segment making up resource name. It identifies the resource within its parent collection as described in https://google.aip.dev/122.
    Locked bool
    Indicates if the PromptTemplate has been locked for mutations. It is strongly recommended that PromptTemplates used in production Apps be locked to avoid accidental distruption to live apps. To modify a PromptTemplate that has been locked, a call to ModifyLock with lock=false is required first.
    Model string
    The model name parsed from the template_string.
    Name string
    Identifier. The resource name of the PromptTemplate. Format: projects/{project}/locations/{location}/templates/{prompt_template}
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    StateChangeTime string
    Timestamp when the PromptTemplate state was last changed.
    TemplateId string
    The unique ID of the PromptTemplate, which is the final component of the PromptTemplate's resource name.
    TemplateString string
    The DotPrompt raw template string.
    UpdateTime string
    Timestamp when the PromptTemplate was last updated.
    createTime String
    Timestamp when the PromptTemplate was created.
    displayName String
    The display name of the PromptTemplate.
    location String
    Resource ID segment making up resource name. It identifies the resource within its parent collection as described in https://google.aip.dev/122.
    locked Boolean
    Indicates if the PromptTemplate has been locked for mutations. It is strongly recommended that PromptTemplates used in production Apps be locked to avoid accidental distruption to live apps. To modify a PromptTemplate that has been locked, a call to ModifyLock with lock=false is required first.
    model String
    The model name parsed from the template_string.
    name String
    Identifier. The resource name of the PromptTemplate. Format: projects/{project}/locations/{location}/templates/{prompt_template}
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    stateChangeTime String
    Timestamp when the PromptTemplate state was last changed.
    templateId String
    The unique ID of the PromptTemplate, which is the final component of the PromptTemplate's resource name.
    templateString String
    The DotPrompt raw template string.
    updateTime String
    Timestamp when the PromptTemplate was last updated.
    createTime string
    Timestamp when the PromptTemplate was created.
    displayName string
    The display name of the PromptTemplate.
    location string
    Resource ID segment making up resource name. It identifies the resource within its parent collection as described in https://google.aip.dev/122.
    locked boolean
    Indicates if the PromptTemplate has been locked for mutations. It is strongly recommended that PromptTemplates used in production Apps be locked to avoid accidental distruption to live apps. To modify a PromptTemplate that has been locked, a call to ModifyLock with lock=false is required first.
    model string
    The model name parsed from the template_string.
    name string
    Identifier. The resource name of the PromptTemplate. Format: projects/{project}/locations/{location}/templates/{prompt_template}
    project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    stateChangeTime string
    Timestamp when the PromptTemplate state was last changed.
    templateId string
    The unique ID of the PromptTemplate, which is the final component of the PromptTemplate's resource name.
    templateString string
    The DotPrompt raw template string.
    updateTime string
    Timestamp when the PromptTemplate was last updated.
    create_time str
    Timestamp when the PromptTemplate was created.
    display_name str
    The display name of the PromptTemplate.
    location str
    Resource ID segment making up resource name. It identifies the resource within its parent collection as described in https://google.aip.dev/122.
    locked bool
    Indicates if the PromptTemplate has been locked for mutations. It is strongly recommended that PromptTemplates used in production Apps be locked to avoid accidental distruption to live apps. To modify a PromptTemplate that has been locked, a call to ModifyLock with lock=false is required first.
    model str
    The model name parsed from the template_string.
    name str
    Identifier. The resource name of the PromptTemplate. Format: projects/{project}/locations/{location}/templates/{prompt_template}
    project str
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    state_change_time str
    Timestamp when the PromptTemplate state was last changed.
    template_id str
    The unique ID of the PromptTemplate, which is the final component of the PromptTemplate's resource name.
    template_string str
    The DotPrompt raw template string.
    update_time str
    Timestamp when the PromptTemplate was last updated.
    createTime String
    Timestamp when the PromptTemplate was created.
    displayName String
    The display name of the PromptTemplate.
    location String
    Resource ID segment making up resource name. It identifies the resource within its parent collection as described in https://google.aip.dev/122.
    locked Boolean
    Indicates if the PromptTemplate has been locked for mutations. It is strongly recommended that PromptTemplates used in production Apps be locked to avoid accidental distruption to live apps. To modify a PromptTemplate that has been locked, a call to ModifyLock with lock=false is required first.
    model String
    The model name parsed from the template_string.
    name String
    Identifier. The resource name of the PromptTemplate. Format: projects/{project}/locations/{location}/templates/{prompt_template}
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    stateChangeTime String
    Timestamp when the PromptTemplate state was last changed.
    templateId String
    The unique ID of the PromptTemplate, which is the final component of the PromptTemplate's resource name.
    templateString String
    The DotPrompt raw template string.
    updateTime String
    Timestamp when the PromptTemplate was last updated.

    Import

    PromptTemplate can be imported using any of these accepted formats:

    • projects/{{project}}/locations/{{location}}/templates/{{template_id}}

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

    • {{location}}/{{template_id}}

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

    $ pulumi import gcp:firebase/aiLogicPromptTemplate:AiLogicPromptTemplate default projects/{{project}}/locations/{{location}}/templates/{{template_id}}
    
    $ pulumi import gcp:firebase/aiLogicPromptTemplate:AiLogicPromptTemplate default {{project}}/{{location}}/{{template_id}}
    
    $ pulumi import gcp:firebase/aiLogicPromptTemplate:AiLogicPromptTemplate default {{location}}/{{template_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-beta Terraform Provider.
    gcp logo
    Google Cloud v9.11.0 published on Tuesday, Feb 3, 2026 by Pulumi
      Meet Neo: Your AI Platform Teammate