https://pulumi.com logo
#aws
Title
# aws
k

kind-carpenter-52856

01/04/2022, 3:02 PM
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

billowy-army-68599

01/04/2022, 3:52 PM
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

kind-carpenter-52856

01/04/2022, 5:33 PM
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

little-cartoon-10569

01/04/2022, 8:04 PM
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

kind-carpenter-52856

01/05/2022, 7:40 AM
@little-cartoon-10569 solve by deleteBeforeReplace, thx a lot 🙂
👍 1
14 Views