Replies: 1 comment 9 replies
-
Yes, you're supposed to have one super-config with all users bundled together. An entire config is synchornized on every run. Objects which are no longer present in config will be deleted. Alternatively, you may have multiple SnowDDL admin users and admin roles, one role per config. SnowDDL only tries to delete objects directly owned by current SnowDDL admin role. Objects owned by other roles are untouched. |
Beta Was this translation helpful? Give feedback.
9 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Adding new user to user.yaml and running snowddl plan it show deleting existing user
can you please help why plan is showing deleting everything which was present in db.
I had below folder structure
snowflake
|
_config
|
snowflake_01
|
DBNAME
|
user.yaml
technical_role.yaml
business_role.yaml
warehouse.yaml
snowflake_02
|
user.yaml
I am running command from _config folder using python file.
command = ["snowddl", "-c", config_folder, "-a", account, "-r", role, "-u", user,"-p", password, "plan"]
Output: of plan --- Suggested DDL ---
DROP ROLE "TEST_WH__MONITOR__W_ROLE";
DROP ROLE "TEST_WH__USAGE__W_ROLE";
DROP ROLE "TEST__RRSAC360__OWNER__S_ROLE";
DROP ROLE "TEST__RRSAC360__READ__S_ROLE";
DROP ROLE "TEST__RRSAC360__WRITE__S_ROLE";
DROP ROLE "TEST_READ_ROLE__B_ROLE";
DROP ROLE "TEST_WRITE_ROLE__B_ROLE";
DROP ROLE "TESTDB_READ_ROLE__B_ROLE";
DROP ROLE "TESTDB_WRITE_ROLE__B_ROLE";
REVOKE ROLE "SYSADMIN" FROM ROLE "TEST_ADMIN_USER__U_ROLE";
CREATE ROLE "TEST__U_ROLE";
GRANT ROLE "TEST__U_ROLE" TO ROLE "USERADMIN";
GRANT ROLE "SYSADMIN__B_ROLE" TO ROLE "TEST__U_ROLE";
CREATE USER "TEST"
PASSWORD = 'HIDING'
LOGIN_NAME = 'TEST'
DISPLAY_NAME = 'TEST'
DISABLED = FALSE
FIRST_NAME = NULL
LAST_NAME = NULL
EMAIL = NULL
DEFAULT_WAREHOUSE = 'TEST_WH'
DEFAULT_NAMESPACE = NULL
DEFAULT_ROLE = "TEST__U_ROLE"
COMMENT = 'User created with SnowDDL' ;
GRANT ROLE "TEST__U_ROLE" TO USER "TEST";
Beta Was this translation helpful? Give feedback.
All reactions