Import with different parameters
antdking opened this issue ยท 1 comments
Hello!
- Vote on this issue by adding a ๐ reaction
- If you want to implement this feature, comment to let us know (we'll work with you on design, scheduling, etc.)
Issue details
Currently, it's possible to import a RandomPassword
with the below command (as documented):
pulumi import random:index/randomPassword:RandomPassword newPassword supersecret
which will generate the below code:
new_password = random.RandomPassword("newPassword",
length=11,
lower=True,
number=True,
numeric=True,
special=True,
upper=True,
opts=pulumi.ResourceOptions(protect=True))
It isn't possible, however, to import with different parameters, such as with special=False
.
Terraform provides a work-around by use of ignore_changes
, where you can temporarily mark a parameter as ignored while you change it, then remove the ignore afterwards.
This doesn't work in Pulumi, as the input
remains unchanged in state when the parameter is ignored.
This means making the change isn't possible without either losing the value, or manually modifying the state:
numeric=True,
- special=True,
+ special=False,
upper=True,
The example above uses RandomPassword
, however it's assumed this also impacts RandomString
as well.
Originally raised in Slack