Skip to content

Commit 1e8fa22

Browse files
matanmgglDawid212
authored andcommitted
Adds Datastream connection profile for Salesforce (GoogleCloudPlatform#13195)
1 parent e1b1709 commit 1e8fa22

File tree

2 files changed

+94
-0
lines changed

2 files changed

+94
-0
lines changed

mmv1/products/datastream/ConnectionProfile.yaml

+78
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,11 @@ examples:
9797
test_vars_overrides:
9898
'deletion_protection': 'false'
9999
exclude_test: true
100+
- name: 'datastream_connection_profile_salesforce'
101+
primary_resource_id: 'default'
102+
vars:
103+
source_connection_profile_id: 'source-profile'
104+
exclude_test: true
100105
parameters:
101106
- name: 'connectionProfileId'
102107
type: String
@@ -143,6 +148,7 @@ properties:
143148
- 'bigquery_profile'
144149
- 'postgresql_profile'
145150
- 'sql_server_profile'
151+
- 'salesforce_profile'
146152
properties:
147153
- name: 'hostname'
148154
type: String
@@ -185,6 +191,7 @@ properties:
185191
- 'bigquery_profile'
186192
- 'postgresql_profile'
187193
- 'sql_server_profile'
194+
- 'salesforce_profile'
188195
properties:
189196
- name: 'bucket'
190197
type: String
@@ -206,6 +213,7 @@ properties:
206213
- 'bigquery_profile'
207214
- 'postgresql_profile'
208215
- 'sql_server_profile'
216+
- 'salesforce_profile'
209217
properties:
210218
- name: 'hostname'
211219
type: String
@@ -289,6 +297,7 @@ properties:
289297
- 'bigquery_profile'
290298
- 'postgresql_profile'
291299
- 'sql_server_profile'
300+
- 'salesforce_profile'
292301
properties:
293302
[]
294303
- name: 'postgresqlProfile'
@@ -302,6 +311,7 @@ properties:
302311
- 'bigquery_profile'
303312
- 'postgresql_profile'
304313
- 'sql_server_profile'
314+
- 'salesforce_profile'
305315
properties:
306316
- name: 'hostname'
307317
type: String
@@ -330,6 +340,73 @@ properties:
330340
description: |
331341
Database for the PostgreSQL connection.
332342
required: true
343+
- name: 'salesforceProfile'
344+
min_version: beta
345+
type: NestedObject
346+
description: |
347+
Salesforce profile.
348+
exactly_one_of:
349+
- 'oracle_profile'
350+
- 'gcs_profile'
351+
- 'mysql_profile'
352+
- 'bigquery_profile'
353+
- 'postgresql_profile'
354+
- 'sql_server_profile'
355+
- 'salesforce_profile'
356+
properties:
357+
- name: 'domain'
358+
type: String
359+
description: |
360+
Domain for the Salesforce Org.
361+
required: true
362+
- name: 'userCredentials'
363+
type: NestedObject
364+
description: |
365+
User credentials to use for Salesforce authentication.
366+
exactly_one_of:
367+
- 'user_credentials'
368+
- 'oauth2_client_credentials'
369+
properties:
370+
- name: 'username'
371+
type: String
372+
description: |
373+
Username to use for authentication.
374+
- name: 'password'
375+
type: String
376+
description: |
377+
Password of the user.
378+
- name: 'security_token'
379+
type: String
380+
description: |
381+
Security token of the user.
382+
- name: 'secret_manager_stored_password'
383+
type: String
384+
description: |
385+
A reference to a Secret Manager resource name storing the user's password.
386+
- name: 'secret_manager_stored_security_token'
387+
type: String
388+
description: |
389+
A reference to a Secret Manager resource name storing the user's security token.
390+
- name: 'oauth2ClientCredentials'
391+
type: NestedObject
392+
description: |
393+
OAuth credentials to use for Salesforce authentication.
394+
exactly_one_of:
395+
- 'user_credentials'
396+
- 'oauth2_client_credentials'
397+
properties:
398+
- name: 'client_id'
399+
type: String
400+
description: |
401+
Client ID to use for authentication.
402+
- name: 'client_secret'
403+
type: String
404+
description: |
405+
Client secret to use for authentication.
406+
- name: 'secret_manager_stored_client_secret'
407+
type: String
408+
description: |
409+
A reference to a Secret Manager resource name storing the client secret.
333410
- name: 'sqlServerProfile'
334411
type: NestedObject
335412
description: |
@@ -341,6 +418,7 @@ properties:
341418
- 'bigquery_profile'
342419
- 'postgresql_profile'
343420
- 'sql_server_profile'
421+
- 'salesforce_profile'
344422
properties:
345423
- name: 'hostname'
346424
type: String
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
resource "google_datastream_connection_profile" "default" {
2+
display_name = "Salesforce Source"
3+
location = "us-central1"
4+
connection_profile_id = "{{index $.Vars "source_connection_profile_id"}}"
5+
create_without_validation: true
6+
provider = google-beta
7+
8+
salesforce_profile {
9+
domain = "fake-domain.my.salesforce.com"
10+
user_credentials {
11+
username = "fake-username"
12+
secret_manager_stored_password = "fake-password"
13+
secret_manager_stored_security_token = "fake-token"
14+
}
15+
}
16+
}

0 commit comments

Comments
 (0)