Skip to content

Promote Gemini Gcp Enablement Setting Binding from google-beta to google #9407

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/13168.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:new-resource
`google_gemini_gcp_enablement_setting_binding` (GA)
```
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,10 @@ Please refer to the field 'effective_labels' for all of the labels present on th
},
"product": {
Type: schema.TypeString,
Computed: true,
Optional: true,
ValidateFunc: verify.ValidateEnum([]string{"GEMINI_CLOUD_ASSIST", "GEMINI_CODE_ASSIST", ""}),
Description: `Product type of the setting binding. Possible values: ["GEMINI_CLOUD_ASSIST", "GEMINI_CODE_ASSIST"]`,
ValidateFunc: verify.ValidateEnum([]string{"GEMINI_IN_BIGQUERY", ""}),
Description: `Product type of the setting binding. Possible values: ["GEMINI_IN_BIGQUERY"]`,
},
"create_time": {
Type: schema.TypeString,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func TestAccGeminiGeminiGcpEnablementSettingBinding_update(t *testing.T) {

acctest.VcrTest(t, resource.TestCase{
PreCheck: func() { acctest.AccTestPreCheck(t) },
ProtoV5ProviderFactories: acctest.ProtoV5ProviderBetaFactories(t),
ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t),
Steps: []resource.TestStep{
{
Config: testAccGeminiGeminiGcpEnablementSettingBinding_basic(context),
Expand Down Expand Up @@ -54,19 +54,16 @@ func TestAccGeminiGeminiGcpEnablementSettingBinding_update(t *testing.T) {
func testAccGeminiGeminiGcpEnablementSettingBinding_basic(context map[string]interface{}) string {
return acctest.Nprintf(`
data "google_project" "project" {
provider = google-beta
}

resource "google_gemini_gemini_gcp_enablement_setting" "basic" {
provider = google-beta
gemini_gcp_enablement_setting_id = "%{gemini_gcp_enablement_setting_id}"
location = "global"
labels = {"my_key": "my_value"}
enable_customer_data_sharing = true
}

resource "google_gemini_gemini_gcp_enablement_setting_binding" "basic_binding" {
provider = google-beta
gemini_gcp_enablement_setting_id = google_gemini_gemini_gcp_enablement_setting.basic.gemini_gcp_enablement_setting_id
setting_binding_id = "%{setting_binding_id}"
location = "global"
Expand All @@ -78,25 +75,22 @@ resource "google_gemini_gemini_gcp_enablement_setting_binding" "basic_binding" {
func testAccGeminiGeminiGcpEnablementSettingBinding_update(context map[string]interface{}) string {
return acctest.Nprintf(`
data "google_project" "project" {
provider = google-beta
}

resource "google_gemini_gemini_gcp_enablement_setting" "basic" {
provider = google-beta
gemini_gcp_enablement_setting_id = "%{gemini_gcp_enablement_setting_id}"
location = "global"
labels = {"my_key" = "my_value"}
enable_customer_data_sharing = false
}

resource "google_gemini_gemini_gcp_enablement_setting_binding" "basic_binding" {
provider = google-beta
gemini_gcp_enablement_setting_id = google_gemini_gemini_gcp_enablement_setting.basic.gemini_gcp_enablement_setting_id
setting_binding_id = "%{setting_binding_id}"
location = "global"
target = "projects/${data.google_project.project.number}"
labels = {"my_key" = "my_value"}
product = "GEMINI_CODE_ASSIST"
product = "GEMINI_IN_BIGQUERY"
}
`, context)
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ description: |-

The resource for managing GeminiGcpEnablementSetting setting bindings for Admin Control.

~> **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.

To get more information about GeminiGcpEnablementSettingBinding, see:
* How-to Guides
Expand All @@ -35,15 +33,13 @@ To get more information about GeminiGcpEnablementSettingBinding, see:

```hcl
resource "google_gemini_gemini_gcp_enablement_setting" "basic" {
provider = google-beta
gemini_gcp_enablement_setting_id = "ls-tf1"
location = "global"
labels = {"my_key": "my_value"}
enable_customer_data_sharing = true
}

resource "google_gemini_gemini_gcp_enablement_setting_binding" "example" {
provider = google-beta
gemini_gcp_enablement_setting_id = google_gemini_gemini_gcp_enablement_setting.basic.gemini_gcp_enablement_setting_id
setting_binding_id = "ls-tf1b1"
location = "global"
Expand Down Expand Up @@ -81,7 +77,7 @@ The following arguments are supported:
* `product` -
(Optional)
Product type of the setting binding.
Possible values are: `GEMINI_CLOUD_ASSIST`, `GEMINI_CODE_ASSIST`.
Possible values are: `GEMINI_IN_BIGQUERY`.

* `location` -
(Optional)
Expand Down