Skip to content

Commit bf09754

Browse files
Datastream Stream resource (#6806) (#13385)
* Added initial datastream Stream structure * Added basic test for datastream * Removed oracle support since it's hard to test * Added some additional fields that could not previously be handled * Added full example for datastream stream with MySQL -> GCS * Removed additional references to oracle on datastream stream * cleaned up api.yaml and terraform.yaml * Revert "Removed additional references to oracle on datastream stream" This reverts commit 6ce0d705e309f79f8372e9f9706c9c21d34a1415. * Revert "Removed oracle support since it's hard to test" This reverts commit 732cf3036db07192046cda17c85fcec3247b8588. * Added oracleSourceConfig.dropLargeObjects and oracleSourceConfig.streamLargeObjects * Require a value inside jsonFileFormat * Require a value inside bigqueryDestinationConfig * Corrected type of fileRotationMb * Added state field and added default_from_api to a few fields * Fixed typo * Corrected name of default_value property * Removed support for oracle and postgres from Datastream Stream This simplifies the PR; also they are not automatically testable * Converted status field to be computed We will likely want to use either default_from_api or use a desired_state field because this field is only partially specified * Added desired_state field * removed input: true from stream * ignore read on stream connection profiles * Added update test * Added unit test for customizediff * Added unit tests for customize diff * Added external providers * gofmt * Corrected deletion_protection usage * Updates due to code review * Cleaned up test issues * Corrections to tests * Fixed test issues * Added gcs file format to fix tests * Added projectNumberDiffSuppress * Added default_from_api for fileRotationMb * Corrected labels usage in tests * Corrected stream update verb * Cleaned up references to google_storage_bucket.bucket.name * Source / destination profile are not updatable * Marked column length fields as output-only * Made update test use checks instead of importstateverify for state / desired_state * gofmt * Add state to update mask if desired_state is changed Signed-off-by: Modular Magician <[email protected]> Signed-off-by: Modular Magician <[email protected]>
1 parent 00ad141 commit bf09754

13 files changed

+4158
-7
lines changed

.changelog/6806.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:new-resource
2+
`google_datastream_stream`
3+
```

google/provider.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -965,9 +965,9 @@ func Provider() *schema.Provider {
965965
return provider
966966
}
967967

968-
// Generated resources: 257
968+
// Generated resources: 258
969969
// Generated IAM resources: 159
970-
// Total generated resources: 416
970+
// Total generated resources: 417
971971
func ResourceMap() map[string]*schema.Resource {
972972
resourceMap, _ := ResourceMapWithErrors()
973973
return resourceMap
@@ -1193,6 +1193,7 @@ func ResourceMapWithErrors() (map[string]*schema.Resource, error) {
11931193
"google_datastore_index": resourceDatastoreIndex(),
11941194
"google_datastream_connection_profile": resourceDatastreamConnectionProfile(),
11951195
"google_datastream_private_connection": resourceDatastreamPrivateConnection(),
1196+
"google_datastream_stream": resourceDatastreamStream(),
11961197
"google_deployment_manager_deployment": resourceDeploymentManagerDeployment(),
11971198
"google_dialogflow_agent": resourceDialogflowAgent(),
11981199
"google_dialogflow_intent": resourceDialogflowIntent(),

google/resource_datastream_connection_profile.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func resourceDatastreamConnectionProfile() *schema.Resource {
5757
Type: schema.TypeString,
5858
Required: true,
5959
ForceNew: true,
60-
Description: `The name of the location this repository is located in.`,
60+
Description: `The name of the location this connection profile is located in.`,
6161
},
6262
"bigquery_profile": {
6363
Type: schema.TypeList,

google/resource_datastream_connection_profile_generated_test.go

+3
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,9 @@ resource "google_datastream_connection_profile" "default" {
166166
port = 8022
167167
password = "swordfish"
168168
}
169+
labels = {
170+
key = "value"
171+
}
169172
}
170173
`, context)
171174
}

google/resource_datastream_private_connection.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ func resourceDatastreamPrivateConnection() *schema.Resource {
8383
Type: schema.TypeString,
8484
Required: true,
8585
ForceNew: true,
86-
Description: `The name of the location this repository is located in.`,
86+
Description: `The name of the location this private connection is located in.`,
8787
},
8888
"private_connection_id": {
8989
Type: schema.TypeString,

0 commit comments

Comments
 (0)