Skip to content

Commit cb7c693

Browse files
Add Gemini Gemini Gcp Enablement Setting Binding resource (#12897) (#21540)
[upstream:428e9f6830e29bf9e3468c4ee6f4889f59169a90] Signed-off-by: Modular Magician <[email protected]>
1 parent cb73349 commit cb7c693

6 files changed

+166
-0
lines changed

.changelog/12897.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:new-resource
2+
`google_gemini_gemini_gcp_enablement_setting_binding`
3+
```
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// Copyright (c) HashiCorp, Inc.
2+
// SPDX-License-Identifier: MPL-2.0
3+
package gemini_test

google/services/gemini/resource_gemini_gemini_gcp_enablement_setting_generated_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ func testAccGeminiGeminiGcpEnablementSetting_geminiGeminiGcpEnablementSettingBas
6060
resource "google_gemini_gemini_gcp_enablement_setting" "example" {
6161
gemini_gcp_enablement_setting_id = "tf-test-ls1-tf%{random_suffix}"
6262
location = "global"
63+
labels = {"my_key": "my_value"}
6364
enable_customer_data_sharing = true
6465
}
6566
`, context)

google/services/gemini/resource_gemini_gemini_gcp_enablement_setting_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ func testAccGeminiGeminiGcpEnablementSetting_geminiGeminiGcpEnablementSettingBas
5151
resource "google_gemini_gemini_gcp_enablement_setting" "example" {
5252
gemini_gcp_enablement_setting_id = "%{setting_id}"
5353
location = "global"
54+
labels = {"my_key" = "my_value"}
5455
enable_customer_data_sharing = true
5556
}
5657
`, context)
@@ -60,6 +61,7 @@ func testAccGeminiGeminiGcpEnablementSetting_geminiGeminiGcpEnablementSettingBas
6061
resource "google_gemini_gemini_gcp_enablement_setting" "example" {
6162
gemini_gcp_enablement_setting_id = "%{setting_id}"
6263
location = "global"
64+
labels = {"my_key" = "my_value"}
6365
enable_customer_data_sharing = false
6466
}
6567
`, context)

website/docs/r/gemini_gemini_gcp_enablement_setting.html.markdown

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ The resource for managing GeminiGcpEnablement settings for Admin Control.
3737
resource "google_gemini_gemini_gcp_enablement_setting" "example" {
3838
gemini_gcp_enablement_setting_id = "ls1-tf"
3939
location = "global"
40+
labels = {"my_key": "my_value"}
4041
enable_customer_data_sharing = true
4142
}
4243
```
Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
---
2+
# ----------------------------------------------------------------------------
3+
#
4+
# *** AUTO GENERATED CODE *** Type: MMv1 ***
5+
#
6+
# ----------------------------------------------------------------------------
7+
#
8+
# This code is generated by Magic Modules using the following:
9+
#
10+
# Configuration: https:#github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/products/gemini/GeminiGcpEnablementSettingBinding.yaml
11+
# Template: https:#github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/templates/terraform/resource.html.markdown.tmpl
12+
#
13+
# DO NOT EDIT this file directly. Any changes made to this file will be
14+
# overwritten during the next generation cycle.
15+
#
16+
# ----------------------------------------------------------------------------
17+
subcategory: "Gemini for Google Cloud"
18+
description: |-
19+
The resource for managing GeminiGcpEnablementSetting setting bindings for Admin Control.
20+
---
21+
22+
# google_gemini_gemini_gcp_enablement_setting_binding
23+
24+
The resource for managing GeminiGcpEnablementSetting setting bindings for Admin Control.
25+
26+
~> **Warning:** This resource is in beta, and should be used with the terraform-provider-google-beta provider.
27+
See [Provider Versions](https://terraform.io/docs/providers/google/guides/provider_versions.html) for more details on beta resources.
28+
29+
To get more information about GeminiGcpEnablementSettingBinding, see:
30+
* How-to Guides
31+
* [Gemini Cloud Assist overview](https://cloud.google.com/gemini/docs/cloud-assist/overview)
32+
33+
## Example Usage - Gemini Gemini Gcp Enablement Setting Binding Basic
34+
35+
36+
```hcl
37+
resource "google_gemini_gemini_gcp_enablement_setting" "basic" {
38+
provider = google-beta
39+
gemini_gcp_enablement_setting_id = "ls-tf1"
40+
location = "global"
41+
labels = {"my_key": "my_value"}
42+
enable_customer_data_sharing = true
43+
}
44+
45+
resource "google_gemini_gemini_gcp_enablement_setting_binding" "example" {
46+
provider = google-beta
47+
gemini_gcp_enablement_setting_id = google_gemini_gemini_gcp_enablement_setting.basic.gemini_gcp_enablement_setting_id
48+
setting_binding_id = "ls-tf1b1"
49+
location = "global"
50+
target = "projects/980109375338"
51+
}
52+
```
53+
54+
## Argument Reference
55+
56+
The following arguments are supported:
57+
58+
59+
* `target` -
60+
(Required)
61+
Target of the binding.
62+
63+
* `gemini_gcp_enablement_setting_id` -
64+
(Required)
65+
Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.
66+
67+
* `setting_binding_id` -
68+
(Required)
69+
Id of the setting binding.
70+
71+
72+
- - -
73+
74+
75+
* `labels` -
76+
(Optional)
77+
Labels as key value pairs.
78+
**Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
79+
Please refer to the field `effective_labels` for all of the labels present on the resource.
80+
81+
* `product` -
82+
(Optional)
83+
Product type of the setting binding.
84+
Possible values are: `GEMINI_CLOUD_ASSIST`, `GEMINI_CODE_ASSIST`.
85+
86+
* `location` -
87+
(Optional)
88+
Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.
89+
90+
* `project` - (Optional) The ID of the project in which the resource belongs.
91+
If it is not provided, the provider project is used.
92+
93+
94+
## Attributes Reference
95+
96+
In addition to the arguments listed above, the following computed attributes are exported:
97+
98+
* `id` - an identifier for the resource with format `projects/{{project}}/locations/{{location}}/geminiGcpEnablementSettings/{{gemini_gcp_enablement_setting_id}}/settingBindings/{{setting_binding_id}}`
99+
100+
* `name` -
101+
Identifier. Name of the resource.
102+
Format:projects/{project}/locations/{location}/geminiGcpEnablementSettings/{setting}/settingBindings/{setting_binding}
103+
104+
* `create_time` -
105+
Create time stamp.
106+
107+
* `update_time` -
108+
Update time stamp.
109+
110+
* `terraform_labels` -
111+
The combination of labels configured directly on the resource
112+
and default labels configured on the provider.
113+
114+
* `effective_labels` -
115+
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Terraform, other clients and services.
116+
117+
118+
## Timeouts
119+
120+
This resource provides the following
121+
[Timeouts](https://developer.hashicorp.com/terraform/plugin/sdkv2/resources/retries-and-customizable-timeouts) configuration options:
122+
123+
- `create` - Default is 20 minutes.
124+
- `update` - Default is 20 minutes.
125+
- `delete` - Default is 20 minutes.
126+
127+
## Import
128+
129+
130+
GeminiGcpEnablementSettingBinding can be imported using any of these accepted formats:
131+
132+
* `projects/{{project}}/locations/{{location}}/geminiGcpEnablementSettings/{{gemini_gcp_enablement_setting_id}}/settingBindings/{{setting_binding_id}}`
133+
* `{{project}}/{{location}}/{{gemini_gcp_enablement_setting_id}}/{{setting_binding_id}}`
134+
* `{{location}}/{{gemini_gcp_enablement_setting_id}}/{{setting_binding_id}}`
135+
136+
137+
In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import GeminiGcpEnablementSettingBinding using one of the formats above. For example:
138+
139+
```tf
140+
import {
141+
id = "projects/{{project}}/locations/{{location}}/geminiGcpEnablementSettings/{{gemini_gcp_enablement_setting_id}}/settingBindings/{{setting_binding_id}}"
142+
to = google_gemini_gemini_gcp_enablement_setting_binding.default
143+
}
144+
```
145+
146+
When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), GeminiGcpEnablementSettingBinding can be imported using one of the formats above. For example:
147+
148+
```
149+
$ terraform import google_gemini_gemini_gcp_enablement_setting_binding.default projects/{{project}}/locations/{{location}}/geminiGcpEnablementSettings/{{gemini_gcp_enablement_setting_id}}/settingBindings/{{setting_binding_id}}
150+
$ terraform import google_gemini_gemini_gcp_enablement_setting_binding.default {{project}}/{{location}}/{{gemini_gcp_enablement_setting_id}}/{{setting_binding_id}}
151+
$ terraform import google_gemini_gemini_gcp_enablement_setting_binding.default {{location}}/{{gemini_gcp_enablement_setting_id}}/{{setting_binding_id}}
152+
```
153+
154+
## User Project Overrides
155+
156+
This resource supports [User Project Overrides](https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/provider_reference#user_project_override).

0 commit comments

Comments
 (0)