https://pulumi.com logo
Title
t

thankful-king-67661

09/29/2022, 11:12 PM
opts=ResourceOptions(
                                    import_=AZURE_EXISTING_CONTAINER_REGISTRY_ID,
                                    retain_on_delete=True,
                                    protect=True
)
l

little-cartoon-10569

09/29/2022, 11:44 PM
Since import is a one-time opt, and you have to remove it once the import is finished, why bother getting it from config? Just put it straight into the opt.
t

thankful-king-67661

09/30/2022, 1:29 AM
I am just trying to protect the ids in version control
l

little-cartoon-10569

09/30/2022, 1:35 AM
You'll just need to commit then again with the import_ removed...
t

thankful-king-67661

09/30/2022, 1:36 AM
so what if other team, mate pull the code?
it wont be consistent?
oh I see, so once the resource is in state I can remove the opts?
l

little-cartoon-10569

09/30/2022, 1:37 AM
Yes, the import is a one-time action. You must remove it after the import has happened.
🙌 1
👍 1