Hey, we also rotate our SA keys. To work around this, we have a daily DAG with PythonOperators which fetch the keys and update the corresponding GCP connections, storing the key in the keyfile dict.
conn.set_extra(json.dumps({
'extra__google_cloud_platform__project': project,
'extra__google_cloud_platform__keyfile_dict': str(base64.b64decode(key['privateKeyData']), 'utf-8'),
}))
-------------------------------------------------------
essenceglobal.com
[essenceglobal.com]
Facebook
[facebook.com] • Twitter
[twitter.com] • YouTube
[youtube.com] • Instagram
[instagram.com]
--
You received this message because you are subscribed to the Google Groups "cloud-composer-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
cloud-composer-di...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/cloud-composer-discuss/354d08e6-ed89-4dfe-9654-e22c09a6ebd9%40googlegroups.com [groups.google.com].
To unsubscribe from this group and stop receiving emails from it, send an email to cloud-composer-discuss+unsub...@googlegroups.com.
Hey Bikram,
Yes, Connection is a sqlalchemy object and you need to commit the changes at the end with `session.commit()`
I attached a full example.
PS: keep in mind the Web UI will display the field as empty either way and - even worse - will clear the field in the DB if you press save.
Best
Cedrik