acoustic-telephone-56263
04/14/2023, 7:48 AMpulumi up -s <stack_name>
.
But the question is - what would be preferable way (or is it possible at all), not to tear down everything (schema, user data) when doing pulumi down
?steep-toddler-94095
04/14/2023, 4:42 PMacoustic-telephone-56263
04/14/2023, 5:49 PMSorry I was wrong, I will keep use your product
.
Due to cost savings I might do pulumi down -s <user_stack>
, but would like to keep database schema and user untouched. With current usage, it removes everything from DBS as well.
Example of current implementation
database = mysql.Database(
"user_database",
name=data.get("db_name"),
)
user = mysql.User(
"database_user",
user=data.get("db_user"),
host="%",
plaintext_password=data.get("db_password"),
)
mysql.Grant(
"database_user_privileges",
user=user.user,
host=user.host,
database=database.name,
privileges=[
"CREATE",
"SELECT",
"UPDATE",
"REFERENCES",
"DELETE",
"INSERT",
],
)
steep-toddler-94095
04/14/2023, 6:15 PMIf a retained resource is deleted by Pulumi and you later want to actually delete it from the backing cloud provider you will either need to use your provider’s manual interface to find and delete the resource, or import the resource back into Pulumi to unsetSimilarly, you'll also have to import the resource into Pulumi if the customer changes their mindand delete it again fully.retainOnDelete
acoustic-telephone-56263
04/14/2023, 6:24 PM