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

Address Lot Datasource and Resource #304

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

internet-diglett
Copy link

@internet-diglett internet-diglett commented Apr 9, 2024

Summary

Add the ability to manage address lots via Terraform Provider

Changes

  • Add datasource for Address Lots
  • Add resource for Address Lots
  • Update changelog
  • Update documentation

Related

Closes #306

Copy link
Collaborator

@karencfv karencfv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for opening up this PR! Super excited to have more people contributing to this repo.

Looks good overall, just a few comments:

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's change the name of the file to data_source_address_lots.go so it's consistent with the data source name :)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same about the name change on this file

},
"description": schema.StringAttribute{
Computed: true,
Description: "human-readable free-form text about an Address Lot",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Description: "human-readable free-form text about an Address Lot",
Description: "Human-readable free-form text about an Address Lot",

}
`

func TestAccCloudDataSourceNetworkingAddressLots_full(t *testing.T) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The prefix is to differentiate between "cloud" and "silo" endpoints. I use this manly for testing on the colo rack, where the user on the GH action doesn't have admin privileges

Suggested change
func TestAccCloudDataSourceNetworkingAddressLots_full(t *testing.T) {
func TestAccSiloDataSourceNetworkingAddressLots_full(t *testing.T) {

@internet-diglett internet-diglett changed the title Add system networking to provider Address Lot Datasource and Resource Apr 9, 2024
@internet-diglett internet-diglett marked this pull request as draft April 9, 2024 19:22
@internet-diglett
Copy link
Author

internet-diglett commented Apr 9, 2024

Looks like we may need to update existing endpoints / expose some new endpoints from the control plane to implement Address Lots in a similar way to how we handle similar resources, like IP Pools:

https://docs.oxide.computer/api/networking_address_lot_list

https://docs.oxide.computer/api/ip_pool_list

Essentially with address lots, we cannot create a lot, then create a block for a lot. We have to declare the lot and blocks at the same time. However, you cannot view the blocks when you view a lot. You cannot add / remove blocks either. Conversely, you can create pools, then create / view / remove ranges for a pool separately.

Will discuss with the networking team and revisit once a decision has been made.

@internet-diglett
Copy link
Author

Confirmed, we're going to update the system networking APIs to make them more consistent, then resume updating the Terraform provider.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

System Networking - Address Lots
2 participants