This repository was archived by the owner on May 1, 2025. It is now read-only.
Description This issue was originally opened by @hsanjuan as hashicorp/packer#9481 . It was migrated here as a result of the Packer plugin split . The original body of the issue is below.
Overview of the Issue
The jdcloud builder does not perform much of a cleanup. It leaves eips, vpc, subnets and ssh keys hanging around.
In the case of eips, they cost money and the user is not warned.
In the case of vpc and subnets, it gives a default "created_by_packer" name which causes next Packer build to fail because they already exist.
Reproduction Steps
Build with jdcloud builder without specifying subnet_id.
Rebuild the same thing
Check the console interface: Created EIP is not cleaned up with the instance.
Packer version
1.6.0
Simplified Packer Buildfile
{
"image_name": "name",
"type": "jdcloud",
"image_id": "img-xxxx",
"region_id": "{{ user `region` }}",
"az": "{{ user `az` }}",
"instance_name": "somethingunique_{{ timestamp }}",
"instance_type": "g.n2.medium",
"temporary_key_pair_name": "whatever_new_key_name",
"communicator": "ssh",
"ssh_username": "root",
"ssh_timeout": "120s"
}
cc. codeowners @XiaohanLiang @remrain
Reactions are currently unavailable
This issue was originally opened by @hsanjuan as hashicorp/packer#9481. It was migrated here as a result of the Packer plugin split. The original body of the issue is below.
Overview of the Issue
The jdcloud builder does not perform much of a cleanup. It leaves eips, vpc, subnets and ssh keys hanging around.
In the case of eips, they cost money and the user is not warned.
In the case of vpc and subnets, it gives a default "created_by_packer" name which causes next Packer build to fail because they already exist.
Reproduction Steps
Packer version
1.6.0
Simplified Packer Buildfile
cc. codeowners @XiaohanLiang @remrain