Terraform: feature: triton provider - support for nic ordering

Created on 18 Apr 2017  ·  5Comments  ·  Source: hashicorp/terraform

Right now if an instance is provisioned with multiple nics there is no way to influence actual nic ordering.

Example:

  nic     = {
    network = "b1c47e55-27f2-4bc7-a404-d9ecdd6ffbd5"
  }
  nic     = {
    network = "8359e97d-30df-4aaf-a385-527e33b7457a"
  }

Always prefers UUID 8359e97d as the primary interface no matter what the order is.

Maybe there is a way to influence this right now, and I am just unaware of it?

Could be achieved by making "primary" property writable here https://github.com/hashicorp/terraform/blob/master/builtin/providers/triton/resource_machine.go#L129

enhancement providetriton

Most helpful comment

HI @pannon! Thanks for opening an issue here. I think the correct solution to this is to make NICs of TypeList instead of TypeSet such that the ordering is consistent. I'll look at doing this today.

All 5 comments

HI @pannon! Thanks for opening an issue here. I think the correct solution to this is to make NICs of TypeList instead of TypeSet such that the ordering is consistent. I'll look at doing this today.

Hi @jen20, this is pretty much the only outstanding issue on the triton provider - so far things are looking good!

The workaround I am using right now (not ideal by any means, but works) is to add the second interface to *.tf file after the machines are created.

PS: Also, not entirely sure whether machine affinity/placement rules could be added in the future to triton driver (just like with triton cli tool). Right now I am relying on Triton auto placement rules (which I've configured to spread as much as possible across our physical nodes).

Thanks for looking at this.

@pannon See #14370. Also, affinity and better CNS support is going to show up very soon. PS, going to BSDCan this year? 😉

@sean- nice one - Thanks for looking at this!

Will make it next year - missed the boat on this one.

I'm going to lock this issue because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

Was this page helpful?
0 / 5 - 0 ratings