-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
area/importAn issue related to `pulumi import` or the import resource option.An issue related to `pulumi import` or the import resource option.kind/enhancementImprovements or new featuresImprovements or new features
Description
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 supersecretwhich 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
Affected area/feature
rcalosso, andrej98, otahirs, csssuf, mb-shorai and 1 more
Metadata
Metadata
Assignees
Labels
area/importAn issue related to `pulumi import` or the import resource option.An issue related to `pulumi import` or the import resource option.kind/enhancementImprovements or new featuresImprovements or new features