Restrict Cloud SQL Databases using governance policy - [DataSourceName] values

Hello,

I want to create a Team Governance Policy which will restrict connecting to Cloud Databases, especially SQL ones (MySQL, PostgreSQL, SQL Server etc.).

I am selecting the template policy "Restrict data sources" and the proposed condition is:

NOT(IN([DataSourceName], LIST("Restricted_DS_0", "Restricted_DS_1")))

I don't know what should I put instead of "Restricted_DS_0".
I couldn't find any list which variable [DataSourceName] can take - is there any article that shows all the possible values of [DataSourceName]?

I've tried different values like below, but without success.

NOT(IN([DataSourceName], LIST("MySQL", "Cloud Database")))

 

0 2 111
2 REPLIES 2

Aurelien
Google Developer Expert
Google Developer Expert

Hi @gRichard 

To be confirmed with @lizlynch, but basically:

DataSourceName are strictly to be used with the "coded name".

For example, for AppSheet database it's :

[DataSourceName] <> "google_tables"

For all cloud database, as far as I remember there is no way to differentiate each one of those. I think it's:

[DataSourceName] <> "cloud_database"

 I'll check it and let you know.

I have 3 apps, 2 of them are connected to MySQL hosted on Google Cloud.

Unfortunatelly your expression is not working

gRichard_0-1695325929221.png

 

Different thing is if I put this:

[DataSourceName] <> "database-1"

gRichard_1-1695326020208.png

But I think the "database-1" is wrong, I can edit it:

gRichard_2-1695326160451.png

 

 

 

Top Labels in this Space