Okay new question, same scenario as the above. I ...
# azure
b
Okay new question, same scenario as the above. I now following the above process can see my resource being marked as "Replaced" however if I add table "T" to database "A" then perform the alias and replace with database "B", my table "T" goes away. So I'm curious what the purpose of alias is if it does not retain the resources internal composition?
b
did you also alias table "T" ?
b
hahahahahah
@billowy-army-68599 You're kidding right?
No I didn't alias the internal data structures.
I guess I could in production, but that seems like a nightmare.
b
sorry i'm a little confused, how are you defining table "T" - as a pulumi resource?
b
T isn't a pulumi resource. I'm declaring the database as a pulumi resource, then adding the table after it's live via a Sql script. I then replace that database from "A" to "B" aliasing the database. I assumed the benefit of using alias is that it knows to rename that resource rather than drop it. Basically I'm trying to prevent losing my data in the database.
b
aliasing won't actually make any changes to the database, that's the point - it means you're changing the name in the state so that it doesn't change anything. I'm surprised to hear that "T" no longer exists after the alias, I wouldn't expect that and I suspect something else is in play
b
okay, so I am barking up the right tree. That is the purpose of aliasing then. I'm not sure what I'm doing wrong since my case has been simplified for this learning process. Would specifying a non-dynamic name cause an issue? I've subverted the random suffix.