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

NFV-22745: introduce new file resource and add cloudInitFileId in device resource to support Aviatrix vendor #294

Merged
merged 4 commits into from
Feb 9, 2023

Conversation

rling-equinix
Copy link
Contributor

In Dec release, we onboarded Aviatrix as our new vendor. It requires the customer to upload cloud init file and do some basic file processing from the file. Hence, new file upload API is introduced to handle such file processing and this new file type. Also, in the device creation flow, new field cloudInitFileId is introduced for the given file. Noted that this new file API can also handle other file type. The processType field is used to identify different file types. More details can be found in the public API documentation.

This PR introduces new file resource as discussed in #287. It allows customer to upload such cloud init file through file resource and apply that file uuid to the device resource's cloud_init_file_id field in terraform script. For example:

variable "filepath" { default = "cloudInitFileFolder/TF-AVX-cloud-init-file.txt" }

resource "equinix_network_file" "aviatrix-cloudinit-file" {
  file_name = "TF-AVX-cloud-init-file.txt"
  content = file("${path.module}/${var.filepath}")
  metro_code = data.equinix_network_account.sv.metro_code
  device_type_code = "AVIATRIX_EDGE"
  process_type = "CLOUD_INIT"
  self_managed = true
  byol = true
}

resource "equinix_network_device" "aviatrix-single" {
  # ... other resource properties
  cloud_init_file_id = equinix_network_file.aviatrix-cloudinit-file.uuid
}

License_file_id has also been updated to support similar use cases.
README file has been updated accordingly to reflect the changes. Two new device type (C8KV router and Aviatrix) scripts have been provided as well for reference.

Besides, since we no longer support Equinix managed device any more and encourage customers to use BYOL license mode, the default value for self-managed and byol field in the file resource has been set to be both true.

reference: NE API Documentation

@rling-equinix
Copy link
Contributor Author

go.mod and go.sum needs to be updated after equinix/ne-go#19 (go client) is merged.

docs/resources/equinix_network_device.md Outdated Show resolved Hide resolved
docs/resources/equinix_network_file.md Outdated Show resolved Hide resolved
@ctreatma ctreatma merged commit b8d0124 into equinix:master Feb 9, 2023
thogarty pushed a commit that referenced this pull request Sep 5, 2023
NFV-22745: introduce new file resource and add cloudInitFileId in device resource to support Aviatrix vendor
@rling-equinix rling-equinix deleted the rui_develop_new branch December 6, 2023 23:06
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.

2 participants