fix: Ignore public_networking attribute to prevent droplet replacement#447
Conversation
The DigitalOcean Terraform provider v2.69.0 introduced public_networking as a new ForceNew attribute on digitalocean_droplet. Since existing droplets were provisioned before this attribute existed in the schema, Terraform was planning a destroy/replace on every run. Adding it to ignore_changes prevents the forced replacement without affecting the actual droplet configuration. https://claude.ai/code/session_01PLmFfETL9zcXNotjb5fVGK
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Review summary
Minimal, targeted fix for a provider compatibility break. The approach is idiomatic Terraform and correctly prevents unintended droplet replacement caused by the Critical issues 🔴None Warnings 🟡Silent drift on Suggestions 🟢Add an inline comment explaining why lifecycle {
create_before_destroy = true
ignore_changes = [
user_data,
# public_networking was added as a ForceNew attribute in DigitalOcean provider
# v2.69.0. Ignoring it prevents unintended destroy/replace on existing droplets.
public_networking,
]
} |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #447 +/- ##
==========================================
+ Coverage 64.59% 70.26% +5.67%
==========================================
Files 154 187 +33
Lines 6064 7439 +1375
==========================================
+ Hits 3917 5227 +1310
+ Misses 2064 2012 -52
- Partials 83 200 +117 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
The DigitalOcean Terraform provider v2.69.0 introduced public_networking as a new ForceNew attribute on digitalocean_droplet. Since existing droplets were provisioned before this attribute existed in the schema, Terraform was planning a destroy/replace on every run. Adding it to ignore_changes prevents the forced replacement without affecting the actual droplet configuration.
https://claude.ai/code/session_01PLmFfETL9zcXNotjb5fVGK