better-shampoo-48884
06/30/2021, 6:56 AMpulumi adopt
- functions like preview/refresh+import, but will preview all resources, and check if it might exist in the target, and if it does (and not in stack), import it.
Alternatively, give an option on a failed pulumi up
to automatically `import`resources into the stack that fail with the error ...already exists
- should be fairly cleear/standard on quite a few providers.bright-sandwich-93783
06/30/2021, 8:59 PMbetter-shampoo-48884
07/01/2021, 7:08 AM├─ dep:components:cache Cache
+ │ └─ azure-native:cache:RedisEnterprise log-region-redisEnterprise-redis **creating failed** 1 error
....
azure-native:cache:RedisEnterprise (log-region-redisEnterprise-redis):
error: Code="Failed" Message="The async operation failed." AdditionalInfo=[{"endTime":"2021-06-30T13:23:52.6943019+00:00","id":"/subscriptions/<sub>/providers/Microsoft.Cache/locations/Region/operationsStatus/<guid>","name":"<guid>","startTime":"2021-06-30T13:16:25.9968294+00:00","status":"Failed"}]
and it's actually created, leading to the next up showing:
dep:components:cache Cache
+ │ └─ azure-native:cache:RedisEnterprise log-region-redisEnterprise-redis **creating failed** 1 error
......
azure-native:cache:RedisEnterprise (log-region-redisEnterprise-redis):
error: cannot create already existing resource '/subscriptions/<sub>/resourceGroups/<rg_name>_region/providers/Microsoft.Cache/redisEnterprise/log-redis'
Meaning I have to either import this into the stack (with a fairly complicated and deep URN), or delete it and try again (and redis takes forever to deploy in azure, probably hence the error above). Having pulumi adopt
run against the stack would easily be able to pick it up and ensure that whatever configuration differences that might exist get ironed out without having to figure out the deep URN path to the resource I don't yet have in the stack..bright-sandwich-93783
07/01/2021, 4:19 PM