Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(instance_server): prevent usage of routed_ip_enabled as false #2763

Merged
merged 5 commits into from
Oct 8, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
lint
  • Loading branch information
Codelax committed Oct 4, 2024

Verified

This commit was signed with the committer’s verified signature.
Codelax Jules Castéran
commit d15f02bab0de261e50dac51bda17c515873a6744
2 changes: 1 addition & 1 deletion internal/services/instance/ip.go
Original file line number Diff line number Diff line change
@@ -49,7 +49,7 @@ func ResourceIP() *schema.Resource {
Severity: diag.Error,
Summary: "NAT IPs are not supported anymore",
Detail: "Remove explicit nat configuration, migrate to routed ips or downgrade terraform.\nLearn more about migration: https://www.scaleway.com/en/docs/compute/instances/how-to/migrate-routed-ips/",
AttributePath: cty.GetAttrPath("type"),
AttributePath: path,
}}
}

4 changes: 2 additions & 2 deletions internal/services/instance/server.go
Original file line number Diff line number Diff line change
@@ -346,12 +346,12 @@ func ResourceServer() *schema.Resource {
if i == nil {
return nil
}
if i.(bool) == false {
if !i.(bool) {
return diag.Diagnostics{{
Severity: diag.Error,
Summary: "NAT IPs are not supported anymore",
Detail: "Remove explicit disabling, enable it or downgrade terraform.\nLearn more about migration: https://www.scaleway.com/en/docs/compute/instances/how-to/migrate-routed-ips/",
AttributePath: cty.GetAttrPath("routed_ip_enabled"),
AttributePath: path,
}}
}