diff --git a/mmv1/products/firebaseailogic/PromptTemplate.yaml b/mmv1/products/firebaseailogic/PromptTemplate.yaml index 7b67c0df0c85..daf2825911e9 100644 --- a/mmv1/products/firebaseailogic/PromptTemplate.yaml +++ b/mmv1/products/firebaseailogic/PromptTemplate.yaml @@ -24,11 +24,12 @@ references: api: 'https://firebase.google.com/docs/reference/ai-logic/rest/v1beta/projects.locations.templates' update_mask: true self_link: projects/{{project}}/locations/{{location}}/templates/{{template_id}} -create_url: projects/{{project}}/locations/{{location}}/templates?promptTemplateId={{template_id}} +create_url: projects/{{project}}/locations/{{location}}/templates?promptTemplateId={{template_id}}®ionalPropagationDisabled={{regional_propagation_disabled}} +update_url: projects/{{project}}/locations/{{location}}/templates/{{template_id}}?regionalPropagationDisabled={{regional_propagation_disabled}} update_verb: PATCH import_format: - projects/{{project}}/locations/{{location}}/templates/{{template_id}} -delete_url: projects/{{project}}/locations/{{location}}/templates/{{template_id}} +delete_url: projects/{{project}}/locations/{{location}}/templates/{{template_id}}?regionalPropagationDisabled={{regional_propagation_disabled}} autogen_async: false autogen_status: UHJvbXB0VGVtcGxhdGU= parameters: @@ -38,6 +39,14 @@ parameters: description: Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122. immutable: true url_param_only: true + - name: regional_propagation_disabled + type: Boolean + default_value: false + description: |- + For the `global` location only. If true, the write operation (create, + update, or delete) will apply to the global region only. Otherwise, the + operation will also propagate to all applicable regions. + url_param_only: true properties: - name: templateId type: String @@ -93,6 +102,11 @@ examples: primary_resource_id: file vars: template_id: 'file-template' + - name: firebaseailogic_prompt_template_global_only + min_version: beta + primary_resource_id: global_only + vars: + template_id: 'global-only-template' - name: firebaseailogic_prompt_template_basic min_version: beta primary_resource_id: basic diff --git a/mmv1/products/firebaseailogic/PromptTemplateLock.yaml b/mmv1/products/firebaseailogic/PromptTemplateLock.yaml index 985c0a1878fa..5db32c1c22c8 100644 --- a/mmv1/products/firebaseailogic/PromptTemplateLock.yaml +++ b/mmv1/products/firebaseailogic/PromptTemplateLock.yaml @@ -33,9 +33,14 @@ examples: template_id: 'lock-template' test_env_vars: project_id: PROJECT_NAME -create_url: projects/{{project}}/locations/{{location}}/templates/{{template_id}}:modifyLock?locked=true + - name: firebaseailogic_prompt_template_lock_global_only + min_version: beta + primary_resource_id: global_only_lock + vars: + template_id: 'global-only-lock-template' +create_url: projects/{{project}}/locations/{{location}}/templates/{{template_id}}:modifyLock?locked=true®ionalPropagationDisabled={{regional_propagation_disabled}} create_verb: POST -delete_url: projects/{{project}}/locations/{{location}}/templates/{{template_id}}:modifyLock?locked=false +delete_url: projects/{{project}}/locations/{{location}}/templates/{{template_id}}:modifyLock?locked=false®ionalPropagationDisabled={{regional_propagation_disabled}} delete_verb: POST custom_code: # We read the PromptTemplate to verify it is locked @@ -55,6 +60,15 @@ parameters: url_param_only: true required: true immutable: true + - name: regional_propagation_disabled + type: Boolean + default_value: false + description: |- + For the `global` location only. If true, the modifyLock operation will + apply to the global region only. Otherwise, the operation will also + propagate to all applicable regions. + url_param_only: true + immutable: true properties: - name: name type: String diff --git a/mmv1/templates/terraform/examples/firebaseailogic_prompt_template_global_only.tf.tmpl b/mmv1/templates/terraform/examples/firebaseailogic_prompt_template_global_only.tf.tmpl new file mode 100644 index 000000000000..62a00a98fff3 --- /dev/null +++ b/mmv1/templates/terraform/examples/firebaseailogic_prompt_template_global_only.tf.tmpl @@ -0,0 +1,7 @@ +resource "google_firebase_ai_logic_prompt_template" "global_only" { + provider = google-beta + location = "global" + template_id = "{{index $.Vars "template_id"}}" + regional_propagation_disabled = true + template_string = file("test-fixtures/hello_world.prompt") +} diff --git a/mmv1/templates/terraform/examples/firebaseailogic_prompt_template_lock_global_only.tf.tmpl b/mmv1/templates/terraform/examples/firebaseailogic_prompt_template_lock_global_only.tf.tmpl new file mode 100644 index 000000000000..5ea5ab792aa8 --- /dev/null +++ b/mmv1/templates/terraform/examples/firebaseailogic_prompt_template_lock_global_only.tf.tmpl @@ -0,0 +1,18 @@ +resource "google_firebase_ai_logic_prompt_template" "global_only" { + provider = google-beta + location = "global" + template_id = "{{index $.Vars "template_id"}}" + template_string = <