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

Can't create a dnat rule with computed IP address #70

Closed
pkleanthous-zz opened this issue Nov 14, 2017 · 2 comments
Closed

Can't create a dnat rule with computed IP address #70

pkleanthous-zz opened this issue Nov 14, 2017 · 2 comments

Comments

@pkleanthous-zz
Copy link

Hi there,

When I'm trying to create a dnat rule with a computed ip address the resource fails.
If I re-run Terraform, the resource succeeds.

Terraform Version

Terraform v0.10.8

Affected Resource(s)

  • vcd_dnat

If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.

Terraform Configuration Files

resource "vcd_dnat" "demo-server-ssh" {
  edge_gateway    = "Internet_ABC"
  external_ip     = "1.2.3.4"
  port            = 22
  internal_ip     = "${vcd_vapp_vm.demo-vm-1.ip}"
  translated_port = 22
  depends_on      = ["vcd_vapp_vm.demo-vm-1"]
}

Debug Output

* vcd_dnat.demo-server-ssh: Error completing tasks: &errors.errorString{s:"Error setting DNAT rules: &errors.errorString{s:\"error reconfiguring Edge Gateway: API Error: 400: [ 28086172-7092-44bb-9137-802416f16cf1 ] validation error on field 'gatewayServiceConfigurationSpec.natSpec.ruleList[1].translatedIp': String value should not be empty\"}"}

Expected Behavior

It should create the relevant resource

Actual Behavior

Terraform apply fails

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform apply
@pkleanthous-zz pkleanthous-zz changed the title Can't create a dnat rule with cimputed IP address Can't create a dnat rule with computed IP address Nov 16, 2017
player-two pushed a commit to player-two/terraform-provider-vcd that referenced this issue Nov 6, 2018
* Added first working implementation for vapp template upload. Issue vmware/go-vcloud-director#50

* Small refactoring and added documentation.

Signed-off-by: Vaidotas Bauzys <[email protected]>
player-two pushed a commit to player-two/terraform-provider-vcd that referenced this issue Nov 6, 2018
@Didainius
Copy link
Collaborator

This should work now with using newer network block in vcd_vapp_vm resources if using POOL ip allocation mode. DHCP could also work, but #316 details what are the issues with DHCP (in short vCD cannot guarantee that guest works and reports the IP it got)

@Didainius
Copy link
Collaborator

@pkleanthous, if you are still interested in getting DHCP IP, you could try and check https://github.com/terraform-providers/terraform-provider-vcd/pull/436 PR and see if it works for you

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