Q:

How do you only associate an aws_eip_address if it doesn't exist with chef?

I have an aws machine defined as such in my chef recipe:
machine "my-server" do
  action :converge
end

aws_eip_address "server_ip_1" do
  machine "my-server"
  associate_to_vpc true
end

When this recipe runs the first time, it creates the machine, and associates the ip correctly.  However, whenever this recipe runs again it throws the following error:

aws_eip_address[server_ip_1] (xx.xx.xx.xx) action create
===================================================================== 
Error executing action create on resource
  'aws_eip_address[server_ip_1] (xx.xx.xx.xx)'
=====================================================================
AWS::EC2::Errors::Resource::AlreadyAssociated

resource eipalloc-xxx is already associated with associate-id eipassoc-xxx

How do I get this recipe to be able to run over and over again?  Can I test if the eip is already associated?  Can I do a try/catch around the resource declaration?
This is pretty frustrating because the documentation is pretty lousy.  Documentation I've found so far includes:

https://docs.chef.io/provisioning_aws.html#aws-eip-address
https://github.com/chef/chef-provisioning-aws/blob/master/docs/examples/eip.rb
https://github.com/chef/chef-provisioning-aws

A:

Answered on Slack, the same resource name was duplicated in another recipe, causing the convergence check to fail incorrectly.

