Hi guys, anyone experience this error when update ...
# aws
k
Hi guys, anyone experience this error when update instance
Copy code
* Error launching source instance: InvalidIPAddress.InUse: Address 172.16.10.20 is in use.
    	status code: 400, request id: eb5c9b5a-970f-472b-9092-f1e82a3760a3
But if i try to change ip address, pulumi can update it
b
this is AWS telling you that there's already an EC2 instance with this IP address in use, this isn't a Pulumi error
k
Hi @billowy-army-68599 thx for reply, any advice how to solve it, i try to change instance type, and issue command “pulumi up” and getting this error, or should i always destroy infrastructure before update it?
l
If you're setting a fixed IP address yourself, then you'll need to set the deleteBeforeReplace opt to true. If you're not, then you'll need to find out why there's a clash; normally, this wouldn't happen.
🙌 1
👍 1
Pulumi intentionally creates replacement resources before deleting the original ones (more info here: https://www.pulumi.com/docs/troubleshooting/faq/#why-do-resource-names-have-random-hex-character-suffixes). So for resources that have properties that must be unique (such as IP addresses on a single subnet), you either have to change the behaviour, or change your logic.
k
@little-cartoon-10569 solve by deleteBeforeReplace, thx a lot 🙂
👍 1