-
Notifications
You must be signed in to change notification settings - Fork 127
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(ipam): show private ips on resources #2759
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2759 +/- ##
==========================================
- Coverage 71.43% 71.40% -0.04%
==========================================
Files 277 328 +51
Lines 35875 33151 -2724
==========================================
- Hits 25628 23672 -1956
+ Misses 8028 7215 -813
- Partials 2219 2264 +45 ☔ View full report in Codecov by Sentry. |
…orm-provider-scaleway into feat/private-ip-management
privateNetworkIDs = append(privateNetworkIDs, pn.PrivateNetworkID) | ||
} | ||
|
||
var allPrivateIPs []map[string]interface{} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Considering server will have at least 1 IP per connected private network. This should be allocated for the minimum size.
if pnI, pnExist := flattenPrivateNetwork(res.Endpoints); pnExist { | ||
_ = d.Set("private_network", pnI) | ||
|
||
if res.Endpoints[0].PrivateNetwork.ProvisioningMode == rdb.EndpointPrivateNetworkDetailsProvisioningModeIpam { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can the first endpoint be something else than a private network ? res.Endpoints[0].PrivateNetwork
may be nil
"address": { | ||
Type: schema.TypeString, | ||
Computed: true, | ||
Description: "The private IP address", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would precise that it is an IPv4
"id": { | ||
Type: schema.TypeString, | ||
Computed: true, | ||
Description: "The ID of the IP address resource", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would precise it is an IPv4
"address": { | ||
Type: schema.TypeString, | ||
Computed: true, | ||
Description: "The private IP address", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would precise it is an IPv4
"id": { | ||
Type: schema.TypeString, | ||
Computed: true, | ||
Description: "The ID of the IP address resource", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would precise it is an IPv4
"address": { | ||
Type: schema.TypeString, | ||
Computed: true, | ||
Description: "The private IP address", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would precise it is an IPv4
"id": { | ||
Type: schema.TypeString, | ||
Computed: true, | ||
Description: "The ID of the IP address resource", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would precise it is an IPv4
"address": { | ||
Type: schema.TypeString, | ||
Computed: true, | ||
Description: "The private IP address", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would precise it is an IPv4
@@ -252,6 +252,10 @@ attached to the server. Updates to this field will trigger a stop/start of the s | |||
- `private_network` - (Optional) The private network associated with the server. | |||
Use the `pn_id` key to attach a [private_network](https://www.scaleway.com/en/developers/api/instance/#path-private-nics-list-all-private-nics) on your instance. | |||
|
|||
- `private_ip` - The list of private IP addresses associated with the resource. | |||
- `id` - The ID of the IP address resource. | |||
- `address` - The private IP address. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would precise it is an IPv4
@@ -244,6 +246,25 @@ If this behaviour is wanted, please set 'reinstall_on_ssh_key_changes' argument | |||
}, | |||
}, | |||
}, | |||
"private_ip": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would plural make sense here if it is a list?
No description provided.