Skip to content

Promote Gemini Data Sharing With Google Setting Binding from google-beta to google #9437

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
9 changes: 9 additions & 0 deletions .changelog/13121.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
```release-note:new-resource
`google_gemini_data_sharing_with_google_setting_binding` (GA)
```
```release-note:bug
gemini: fixed permadiff on `product` field in `google_gemini_data_sharing_with_google_setting_binding` resource (Beta)
```
```release-note:note
gemini: removed unsupported value `GEMINI_CODE_ASSIST` for field `product` in `google_gemini_data_sharing_with_google_setting_binding` resource (Beta)
```
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_CLOUD_ASSIST", ""}),
Description: `Product type of the setting binding. Possible values: ["GEMINI_CLOUD_ASSIST"]`,
},
"create_time": {
Type: schema.TypeString,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func TestAccGeminiDataSharingWithGoogleSettingBinding_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: testAccGeminiDataSharingWithGoogleSettingBinding_basic(context),
Expand Down Expand Up @@ -54,19 +54,16 @@ func TestAccGeminiDataSharingWithGoogleSettingBinding_update(t *testing.T) {
func testAccGeminiDataSharingWithGoogleSettingBinding_basic(context map[string]interface{}) string {
return acctest.Nprintf(`
data "google_project" "project" {
provider = google-beta
}

resource "google_gemini_data_sharing_with_google_setting" "basic" {
provider = google-beta
data_sharing_with_google_setting_id = "%{data_sharing_with_google_setting_id}"
location = "global"
labels = {"my_key" = "my_value"}
enable_preview_data_sharing = true
}

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

resource "google_gemini_data_sharing_with_google_setting" "basic" {
provider = google-beta
data_sharing_with_google_setting_id = "%{data_sharing_with_google_setting_id}"
location = "global"
labels = {"my_key" = "my_value"}
enable_preview_data_sharing = true
}

resource "google_gemini_data_sharing_with_google_setting_binding" "basic_binding" {
provider = google-beta
data_sharing_with_google_setting_id = google_gemini_data_sharing_with_google_setting.basic.data_sharing_with_google_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_CLOUD_ASSIST"
}
`, context)
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ description: |-

The resource for managing DataSharingWithGoogle 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 DataSharingWithGoogleSettingBinding, see:
* How-to Guides
Expand All @@ -35,15 +33,13 @@ To get more information about DataSharingWithGoogleSettingBinding, see:

```hcl
resource "google_gemini_data_sharing_with_google_setting" "basic" {
provider = google-beta
data_sharing_with_google_setting_id = "ls-tf1"
location = "global"
labels = {"my_key": "my_value"}
enable_preview_data_sharing = true
}

resource "google_gemini_data_sharing_with_google_setting_binding" "example" {
provider = google-beta
data_sharing_with_google_setting_id = google_gemini_data_sharing_with_google_setting.basic.data_sharing_with_google_setting_id
setting_binding_id = "ls-tf1b1"
location = "global"
Expand Down Expand Up @@ -75,7 +71,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_CLOUD_ASSIST`.

* `labels` -
(Optional)
Expand Down