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

Remove the validation function for purpose attribute for interfaces #1772

Merged
merged 1 commit into from
Feb 24, 2025

Conversation

zliang-akamai
Copy link
Member

@zliang-akamai zliang-akamai commented Feb 19, 2025

📝 Description

As the number of purposes increase, it would be better to delay the validation to the API to keep the consistency.

Testing

Verifying that the API will return an error when an invalid purpose is provided.

locals {
  akamai_firewall_id = 12345 # change to your firewall ID
}

resource "linode_instance_config" "my-config" {
  linode_id = linode_instance.my-instance.id
  label     = "my-config"

  device {
    device_name = "sda"
    disk_id     = linode_instance_disk.boot.id
  }

  interface {
    purpose = "invalid"
  }

  booted = true
}

resource "linode_instance_disk" "boot" {
  label     = "boot"
  linode_id = linode_instance.my-instance.id
  size      = linode_instance.my-instance.specs.0.disk

  image     = "linode/ubuntu22.04"
  root_pass = "myc00leefewfdwqdfe32dwqepass!"
}

resource "linode_instance" "my-instance" {
  label       = "my-instance"
  type        = "g6-standard-1"
  region      = "us-mia"
  firewall_id = local.akamai_firewall_id
}

@zliang-akamai zliang-akamai requested a review from a team as a code owner February 19, 2025 01:51
@zliang-akamai zliang-akamai requested review from jriddle-linode and ykim-akamai and removed request for a team February 19, 2025 01:51
Copy link
Contributor

@lgarber-akamai lgarber-akamai 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 the quick fix!

Copy link
Collaborator

@jriddle-linode jriddle-linode left a comment

Choose a reason for hiding this comment

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

LGTM!

@zliang-akamai zliang-akamai merged commit 250a4b6 into dev Feb 24, 2025
9 checks passed
@zliang-akamai zliang-akamai deleted the zhiwei/remove-interface-purpose-validation branch February 24, 2025 19:35
@yec-akamai yec-akamai added the improvement for improvements in existing functionality in the changelog. label Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement for improvements in existing functionality in the changelog.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants