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

Create an edge gateway resource #262

Closed
dataclouder opened this issue Jun 12, 2019 · 5 comments
Closed

Create an edge gateway resource #262

dataclouder opened this issue Jun 12, 2019 · 5 comments
Assignees

Comments

@dataclouder
Copy link
Contributor

dataclouder commented Jun 12, 2019

A resource vcd_edgegateway allows the creation and deletion of edge gateways. This task is t is the extension of go-vcloud-director Issue 130 where the functionality was implemented.

The basic features of an edge gateway resources are shown in this example

resource "vcd_edgegateway" "egw" {
  org = "my-org"
  vdc = "my-vdc"

  name              = "my-egw"
  description       = "new edge gateway"
  backing_config    = "compact"
  default_gateway   = "my-ext-net1"
  external_networks = [ "my-ext-net1", "my-ext-net2" ]
}

The full list of properties:

  • org - (Optional) The name of organization to which the VDC belongs.
  • vdc - (Optional) The name of VDC that owns the edge gateway.
  • name - (Required) A unique name for the edge gateway.
  • external_networks - (Required) An array of external network names.
  • backing_config - (Required) Configuration of the vShield edge VM for this gateway. One of: compact, full.
  • default_gateway - (Optional) Name of the external network to be used as default gateway. It must be included in the
    list of external_networks. Providing an empty string or omitting the argument will create the edge gateway without a default gateway.
  • advanced - (Required) True if the gateway uses advanced networking.
  • ha_enabled - (Optional) Enable high availability on this edge gateway. Default is false.
  • distributed_routing - (Optional) If advanced networking enabled, also enable distributed routing. Default is false.

Current limitations:

@lvirbalas
Copy link
Collaborator

Does advanced_networking option represent "Create as Advanced Gateway" in the GUI? If yes, I suggest we name it just advanced, as we are aligning Terraform part to the GUI.

@dataclouder
Copy link
Contributor Author

Yes, it does. I will change it to "advanced" and I will need to also make it Required, because in 9.7 it becomes true by default, and vCD ignores input on this field. If we leave it optional, Terraform will fail the check when the property is not provided.
It's easier to make it mandatory and make sure that it is true on 9.7+

@lvirbalas
Copy link
Collaborator

Why not just make it true by default? Then the user can even not use this field and only define it if someone ones the not advanced one.

@dataclouder
Copy link
Contributor Author

Because it is false in vCD with version < 9.7. If we make it true by default it will fail.
The only way is to make it mandatory, and users need to understand whether they want it or not.
If they set it false for 9.7+, they will get an error saying that it must be true.

@dataclouder
Copy link
Contributor Author

Implemented with PR #263

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

No branches or pull requests

2 participants