layer0
layer0 copied to clipboard
Idempotent create for entities
If a failure occurs during entity creation, users must manually destroy what was created in order for the next attempt to succeed. This would also make scripting easier for our users.
Perhaps we try the following logic when the entity already exists:
- Load Balancer: run UpdateLoadBalancer
- Service: if LoadBalancer difference, destroy and re-create. If deploy difference, run UpdateService
- Task: destroy and re-create
- Certificate: we must destroy and re-create since aws doesn't allow updates to certificates
- Deploy: does not apply since users cannot specify version on deploy create
Rare occurrence, low low priority unless failures count drastically increases