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

Add Fabric and VLAN to the Joyent Triton resource #5920

Merged
merged 2 commits into from
Mar 29, 2016

Conversation

BrianHicks
Copy link
Contributor

Hi there! This PR adds Fabric and VLAN support to the Joyent Triton resource. All the acceptance tests (including internal validation) pass. As far as I'm concerned, this is ready to merge.

New resources:

  • triton_vlan
  • triton_fabric

New tests:

  • VLAN: create and update
  • Fabric: create (update not allowed)

Test output:

$ TF_ACC=1 go test -v .
=== RUN   TestProvider
--- PASS: TestProvider (0.00s)
=== RUN   TestProvider_impl
--- PASS: TestProvider_impl (0.00s)
=== RUN   TestAccTritonFabric_basic
--- PASS: TestAccTritonFabric_basic (19.44s)
=== RUN   TestAccTritonFirewallRule_basic
--- PASS: TestAccTritonFirewallRule_basic (6.24s)
=== RUN   TestAccTritonFirewallRule_update
--- PASS: TestAccTritonFirewallRule_update (9.32s)
=== RUN   TestAccTritonFirewallRule_enable
--- PASS: TestAccTritonFirewallRule_enable (10.07s)
=== RUN   TestAccTritonKey_basic
--- PASS: TestAccTritonKey_basic (19.52s)
=== RUN   TestAccTritonMachine_basic
--- PASS: TestAccTritonMachine_basic (198.85s)
=== RUN   TestAccTritonVLAN_basic
--- PASS: TestAccTritonVLAN_basic (5.31s)
=== RUN   TestAccTritonVLAN_update
--- PASS: TestAccTritonVLAN_update (9.84s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/triton 278.607s

Type: schema.TypeInt,
ValidateFunc: func(val interface{}, field string) (warn []string, err []error) {
value := val.(int)
if value < 0 || value > 4095 {
Copy link
Contributor

Choose a reason for hiding this comment

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

The description here doesn't match the condition or the error message - 2 <= value <= 4095 vs 0 < value <= 4095?

Copy link
Contributor

Choose a reason for hiding this comment

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

Docs here seem to indicate 0-4095 is valid - I'll adjust the error and description.

@jen20
Copy link
Contributor

jen20 commented Mar 29, 2016

Hi @BrianHicks! This looks good to me, with the exception of the one minor comment I made on a validation func. I can probably pull this and fix it up on merge though! Thanks!

@ghost
Copy link

ghost commented Apr 27, 2020

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.

@ghost ghost locked and limited conversation to collaborators Apr 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants