diff --git a/.changelog/12338.txt b/.changelog/12338.txt new file mode 100644 index 00000000000..f9eaf18d2c1 --- /dev/null +++ b/.changelog/12338.txt @@ -0,0 +1,3 @@ +```release-note:new-resource +`google_gemini_code_repository_index` +``` \ No newline at end of file diff --git a/.teamcity/components/inputs/services_beta.kt b/.teamcity/components/inputs/services_beta.kt index b025568eac6..be44dcb9698 100644 --- a/.teamcity/components/inputs/services_beta.kt +++ b/.teamcity/components/inputs/services_beta.kt @@ -416,6 +416,11 @@ var ServicesListBeta = mapOf( "displayName" to "Firestore", "path" to "./google-beta/services/firestore" ), + "gemini" to mapOf( + "name" to "gemini", + "displayName" to "Gemini", + "path" to "./google-beta/services/gemini" + ), "gkebackup" to mapOf( "name" to "gkebackup", "displayName" to "Gkebackup", diff --git a/.teamcity/components/inputs/services_ga.kt b/.teamcity/components/inputs/services_ga.kt index 5087bad1188..817c79f96f1 100644 --- a/.teamcity/components/inputs/services_ga.kt +++ b/.teamcity/components/inputs/services_ga.kt @@ -411,6 +411,11 @@ var ServicesListGa = mapOf( "displayName" to "Firestore", "path" to "./google/services/firestore" ), + "gemini" to mapOf( + "name" to "gemini", + "displayName" to "Gemini", + "path" to "./google/services/gemini" + ), "gkebackup" to mapOf( "name" to "gkebackup", "displayName" to "Gkebackup", diff --git a/google/acctest/bootstrap_test_utils.go b/google/acctest/bootstrap_test_utils.go index 0cd53216c83..85882eb7621 100644 --- a/google/acctest/bootstrap_test_utils.go +++ b/google/acctest/bootstrap_test_utils.go @@ -503,7 +503,7 @@ func NewServiceNetworkSettings(options ...func(*ServiceNetworkSettings)) *Servic // must be deleted first. After the service instances are deleted, some service producers delay the deletion // utnil a waiting period has passed. For example, after four days that you delete a SQL instance, // the service networking connection can be deleted. -// That is the reason to use the shared service networking connection for thest resources. +// That is the reason to use the shared service networking connection for test resources. // https://cloud.google.com/vpc/docs/configure-private-services-access#removing-connection // // testId specifies the test for which a shared network and a gobal address are used/initialized. diff --git a/google/services/gemini/resource_gemini_code_repository_index_test.go b/google/services/gemini/resource_gemini_code_repository_index_test.go new file mode 100644 index 00000000000..40f66691570 --- /dev/null +++ b/google/services/gemini/resource_gemini_code_repository_index_test.go @@ -0,0 +1,3 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 +package gemini_test diff --git a/website/docs/r/gemini_code_repository_index.html.markdown b/website/docs/r/gemini_code_repository_index.html.markdown new file mode 100644 index 00000000000..ed9148e4f2b --- /dev/null +++ b/website/docs/r/gemini_code_repository_index.html.markdown @@ -0,0 +1,142 @@ +--- +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** Type: MMv1 *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in +# .github/CONTRIBUTING.md. +# +# ---------------------------------------------------------------------------- +subcategory: "Gemini for Google Cloud" +description: |- + The resource for managing Code Repository Index for Gemini Code Assist. +--- + +# google_gemini_code_repository_index + +The resource for managing Code Repository Index for Gemini Code Assist. + +~> **Warning:** This resource is in beta, and should be used with the terraform-provider-google-beta provider. +See [Provider Versions](https://terraform.io/docs/providers/google/guides/provider_versions.html) for more details on beta resources. + + +## Example Usage - Gemini Code Repository Index Basic + + +```hcl +resource "google_gemini_code_repository_index" "example" { + provider = google-beta + location = "us-central1" + code_repository_index_id = "" + kms_key = "projects/projectExample/locations/locationExample/keyRings/keyRingExample/cryptoKeys/cryptoKeyExample" +} +``` + +## Argument Reference + +The following arguments are supported: + + +* `location` - + (Required) + The location of the Code Repository Index, for example `us-central1`. + +* `code_repository_index_id` - + (Required) + Required. Id of the Code Repository Index. + + +- - - + + +* `labels` - + (Optional) + Optional. Labels as key value pairs. + **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. + Please refer to the field `effective_labels` for all of the labels present on the resource. + +* `kms_key` - + (Optional) + Optional. Immutable. Customer-managed encryption key name, in the format + projects/*/locations/*/keyRings/*/cryptoKeys/*. + +* `project` - (Optional) The ID of the project in which the resource belongs. + If it is not provided, the provider project is used. + + +## Attributes Reference + +In addition to the arguments listed above, the following computed attributes are exported: + +* `id` - an identifier for the resource with format `projects/{{project}}/locations/{{location}}/codeRepositoryIndexes/{{code_repository_index_id}}` + +* `update_time` - + Output only. Update time stamp. + +* `state` - + Output only. Code Repository Index instance State. + Possible values: + STATE_UNSPECIFIED + CREATING + ACTIVE + DELETING + SUSPENDED + +* `name` - + Immutable. Identifier. Name of Code Repository Index. + +* `create_time` - + Output only. Create time stamp. + +* `terraform_labels` - + The combination of labels configured directly on the resource + and default labels configured on the provider. + +* `effective_labels` - + All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Terraform, other clients and services. + + +## Timeouts + +This resource provides the following +[Timeouts](https://developer.hashicorp.com/terraform/plugin/sdkv2/resources/retries-and-customizable-timeouts) configuration options: + +- `create` - Default is 90 minutes. +- `update` - Default is 90 minutes. +- `delete` - Default is 90 minutes. + +## Import + + +CodeRepositoryIndex can be imported using any of these accepted formats: + +* `projects/{{project}}/locations/{{location}}/codeRepositoryIndexes/{{code_repository_index_id}}` +* `{{project}}/{{location}}/{{code_repository_index_id}}` +* `{{location}}/{{code_repository_index_id}}` + + +In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import CodeRepositoryIndex using one of the formats above. For example: + +```tf +import { + id = "projects/{{project}}/locations/{{location}}/codeRepositoryIndexes/{{code_repository_index_id}}" + to = google_gemini_code_repository_index.default +} +``` + +When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), CodeRepositoryIndex can be imported using one of the formats above. For example: + +``` +$ terraform import google_gemini_code_repository_index.default projects/{{project}}/locations/{{location}}/codeRepositoryIndexes/{{code_repository_index_id}} +$ terraform import google_gemini_code_repository_index.default {{project}}/{{location}}/{{code_repository_index_id}} +$ terraform import google_gemini_code_repository_index.default {{location}}/{{code_repository_index_id}} +``` + +## User Project Overrides + +This resource supports [User Project Overrides](https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/provider_reference#user_project_override).