Skip to content

Commit 4803508

Browse files
committed
Addressed review comments
Addressed review comments
1 parent ab1e1ab commit 4803508

File tree

3 files changed

+31
-15
lines changed

3 files changed

+31
-15
lines changed

mmv1/products/datastream/Stream.yaml

+16
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,22 @@ examples:
133133
'deletion_protection': 'false'
134134
# Requires SQLServer Configuration
135135
exclude_test: true
136+
- name: 'datastream_stream_mysql_gtid'
137+
primary_resource_id: 'default'
138+
vars:
139+
database_name: 'db'
140+
database_password: 'password'
141+
database_user: 'user'
142+
deletion_protection: 'true'
143+
destination_connection_profile_id: 'destination-profile'
144+
source_connection_profile_id: 'source-profile'
145+
mysql_name: 'mysql'
146+
mysql_root_password: 'root-password'
147+
stream_id: 'stream'
148+
test_vars_overrides:
149+
'deletion_protection': 'false'
150+
# Requires MySQL Configuration
151+
exclude_test: true
136152
- name: 'datastream_stream_postgresql_bigquery_dataset_id'
137153
primary_resource_id: 'default'
138154
vars:

mmv1/third_party/terraform/services/datastream/resource_datastream_stream_test.go

+15-15
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ func TestAccDatastreamStream_update(t *testing.T) {
3333
ResourceName: "google_datastream_stream.default",
3434
ImportState: true,
3535
ImportStateVerify: true,
36-
ImportStateVerifyIgnore: []string{"gtid", "binaryLogPosition", "create_without_validation", "stream_id", "location", "desired_state", "labels", "terraform_labels"},
36+
ImportStateVerifyIgnore: []string{"create_without_validation", "stream_id", "location", "desired_state", "labels", "terraform_labels"},
3737
},
3838
{
3939
Config: testAccDatastreamStream_datastreamStreamBasicUpdate(context, "RUNNING", true),
@@ -43,7 +43,7 @@ func TestAccDatastreamStream_update(t *testing.T) {
4343
ResourceName: "google_datastream_stream.default",
4444
ImportState: true,
4545
ImportStateVerify: true,
46-
ImportStateVerifyIgnore: []string{"gtid", "binaryLogPosition", "create_without_validation", "stream_id", "location", "desired_state", "labels", "terraform_labels"},
46+
ImportStateVerifyIgnore: []string{"create_without_validation", "stream_id", "location", "desired_state", "labels", "terraform_labels"},
4747
},
4848
{
4949
Config: testAccDatastreamStream_datastreamStreamBasicUpdate(context, "PAUSED", true),
@@ -53,7 +53,7 @@ func TestAccDatastreamStream_update(t *testing.T) {
5353
ResourceName: "google_datastream_stream.default",
5454
ImportState: true,
5555
ImportStateVerify: true,
56-
ImportStateVerifyIgnore: []string{"gtid", "binaryLogPosition", "create_without_validation", "stream_id", "location", "desired_state", "labels", "terraform_labels"},
56+
ImportStateVerifyIgnore: []string{"create_without_validation", "stream_id", "location", "desired_state", "labels", "terraform_labels"},
5757
},
5858
{
5959
Config: testAccDatastreamStream_datastreamStreamBasicUpdate(context, "RUNNING", true),
@@ -63,22 +63,22 @@ func TestAccDatastreamStream_update(t *testing.T) {
6363
ResourceName: "google_datastream_stream.default",
6464
ImportState: true,
6565
ImportStateVerify: true,
66-
ImportStateVerifyIgnore: []string{"gtid", "binaryLogPosition", "create_without_validation", "stream_id", "location", "desired_state", "labels", "terraform_labels"},
66+
ImportStateVerifyIgnore: []string{"create_without_validation", "stream_id", "location", "desired_state", "labels", "terraform_labels"},
67+
},
68+
{
69+
ResourceName: "google_datastream_stream.gtid",
70+
ImportState: true,
71+
ImportStateVerify: true,
72+
ImportStateVerifyIgnore: []string{"create_without_validation", "stream_id", "location", "desired_state", "labels", "terraform_labels"},
6773
},
6874
{
6975
// Disable prevent_destroy
7076
Config: testAccDatastreamStream_datastreamStreamBasicUpdate(context, "RUNNING", false),
7177
},
72-
{
78+
{
7379
Config: testAccDatastreamStream_datastreamStreamBasicExample(context),
7480
Check: resource.TestCheckResourceAttr("google_datastream_stream.gtid", "state", "NOT_STARTED"),
7581
},
76-
{
77-
ResourceName: "google_datastream_stream.gtid",
78-
ImportState: true,
79-
ImportStateVerify: true,
80-
ImportStateVerifyIgnore: []string{"gtid", "binaryLogPosition", "create_without_validation", "stream_id", "location", "desired_state", "labels", "terraform_labels"},
81-
},
8282
},
8383
})
8484
}
@@ -215,8 +215,8 @@ resource "google_datastream_stream" "default" {
215215
source_connection_profile = google_datastream_connection_profile.source_connection_profile.id
216216
217217
mysql_source_config {
218-
binary_log_position {}
219-
}
218+
binary_log_position {}
219+
}
220220
}
221221
destination_config {
222222
destination_connection_profile = google_datastream_connection_profile.destination_connection_profile.id
@@ -251,8 +251,8 @@ resource "google_datastream_stream" "gtid" {
251251
source_connection_profile = google_datastream_connection_profile.source_connection_profile.id
252252
253253
mysql_source_config {
254-
gtid {}
255-
}
254+
gtid {}
255+
}
256256
}
257257
destination_config {
258258
destination_connection_profile = google_datastream_connection_profile.destination_connection_profile.id

0 commit comments

Comments
 (0)