Skip to content

Incorrect JSON in API for disabling Outbound Internet traffic #77

Open
@jweaver-skytap

Description

@jweaver-skytap

Skytap Terraform provider is using 'outbound_traffic' when generating the JSON body used with working with Skytap environments. Our API documentation does not have this element documented anywhere, and neither do environment details JSON responses, instead we use 'disable_internet'.

Skytap API doc ref: https://help.skytap.com/API_Documentation.html#Configur

Field Name Type Access Description
disable_internet Boolean rw If true, outbound internet is disabled for VMs in this environment. Note that VMs with public IPs or published services will still be exposed to the Internet.

 

Incorrect code: https://github.com/skytap/terraform-provider-skytap/blob/e81602bd18d73af86687099e90a2234ef17a0556/vendor/github.com/skytap/skytap-sdk-go/skytap/environment.go#L83 

Changing outbound_traffic in the code would probably fix this, but outbound_traffic setting is described as having an opposite effect to the actual Skytap setting disable_internet, so simply correcting that here could have unintentional consequences. I think the best way to fix it would be adding a new setting, disable_internet, and updating the environment handling code to populate the API calls to Skytap with the specified disable_internet setting, or the inverse value of what's specified if outbound_traffic is specified so that it has the intended effect.

Our Terraform reference documentation says:

(optional) Indicates whether networks in the environment can send outbound traffic.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions