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

dns_server needs default value #4

Closed
dtzar opened this issue Nov 22, 2017 · 4 comments
Closed

dns_server needs default value #4

dtzar opened this issue Nov 22, 2017 · 4 comments

Comments

@dtzar
Copy link
Contributor

dtzar commented Nov 22, 2017

If you import the module and don't specify dns_servers = [""] then it will fail with:

Error: Error running plan: 1 error(s) occurred:

* module.network.output.vnet_dns_servers: Resource 'azurerm_virtual_network.vnet' does not have attribute 'dns_servers' for variable 'azurerm_virtual_network.vnet.dns_servers'

Testing with the [""] value using terraform 0.11.0 and Azure provider 0.3.3 - the terraform plan works but in the middle of terraform apply it crashes 👎 with:

!!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!

Terraform crashed! This is always indicative of a bug within Terraform.
A crash log has been placed at "crash.log" relative to your current
working directory. It would be immensely helpful if you could please
report the crash with Terraform[1] so that we can fix this.

When reporting bugs, please include your terraform version. That
information is available on the first line of crash.log. You can also
get it by running 'terraform --version' on the command line.

[1]: https://github.com/hashicorp/terraform/issues

!!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!
2:           "" => "<computed>"

Error: Error applying plan:

4 error(s) occurred:

* module.network.azurerm_network_security_group.security_group: 1 error(s) occurred:

* azurerm_network_security_group.security_group: unexpected EOF
* module.windowsservers.azurerm_resource_group.vm: 1 error(s) occurred:

* azurerm_resource_group.vm: unexpected EOF
* module.linuxservers.provider.azurerm: unexpected EOF
* module.network.azurerm_virtual_network.vnet: 1 error(s) occurred:

* azurerm_virtual_network.vnet: unexpected EOF

2017/11/21 16:56:47 [ERROR] root.network: eval: *terraform.EvalApplyPost, err: 1 error(s) occurred:

* azurerm_virtual_network.vnet: unexpected EOF
2017/11/21 16:56:47 [ERROR] root.network: eval: *terraform.EvalSequence, err: 1 error(s) occurred:

* azurerm_virtual_network.vnet: unexpected EOF
2017/11/21 16:56:47 [TRACE] [walkApply] Exiting eval tree: module.network.azurerm_virtual_network.vnet

When you specify a value of ["10.0.0.4"] it works, but now you're actually requiring an internal DNS server for the subnet (it's no longer optional 👎 )

@mashayev
Copy link

Hey,

Any update?

@ricoli
Copy link
Contributor

ricoli commented Nov 22, 2017

I actually get an error when running a plan when not defining any dns servers, but it's to do with the output (terraform 0.11.0 actually errors if outputs have undefined values):

Error: Error running plan: 1 error(s) occurred:

* module.network.output.vnet_dns_servers: Resource 'azurerm_virtual_network.vnet' does not have attribute 'dns_servers' for variable 'azurerm_virtual_network.vnet.dns_servers'

As you can see from the docs, that attribute (dns_servers) no longer exists (if it ever did?):
https://www.terraform.io/docs/providers/azurerm/r/virtual_network.html
So this output should really just be removed, that should solve the problem.

Edit: I'm using v1.1.0 of this module

@ricoli
Copy link
Contributor

ricoli commented Nov 22, 2017

PR: #6

@dtzar
Copy link
Contributor Author

dtzar commented Nov 22, 2017

This is fixed, merged, and new release. Thanks @ricoli !

@dtzar dtzar closed this as completed Nov 22, 2017
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

3 participants