Closed ismarsantos closed 1 year ago
š Hello!
There are two problems manifesting here.
key_algorithm
is deprecated.$ terraform plan
ā·
ā Warning: Argument is deprecated
ā
ā with module.nomad.tls_self_signed_cert.consul-ca,
ā on .terraform/modules/nomad/consul_tls_ca.tf line 10, in resource "tls_self_signed_cert" "consul-ca":
ā 10: key_algorithm = tls_private_key.consul-ca.algorithm
ā
ā This is now ignored, as the key algorithm is inferred from the `private_key_pem`.
ā
ā (and 13 more similar warnings elsewhere)
āµ
...
Any cases where key_algorithm
is used, we can drop it, and it'll be inferred from private_key_pem
. If I understand correctly, this shouldn't actually block usage of the module -- it's just a warning. But, it's something we should fix.
$ terraform plan
ā·
ā Error: Unsupported attribute
ā
ā on outputs.tf line 4, in output "ca_cert":
ā 4: value = module.nomad.ca_cert
ā āāāāāāāāāāāāāāāāā
ā ā module.nomad is a object, known only after apply
ā
ā This object does not have an attribute named "ca_cert".
āµ
The module outputs in the example directory has some old information. We need to update it. Would look something like:
output "ca_cert" {
sensitive = true
description = "The TLS CA certificate used for CLI authentication."
value = module.nomad.nomad_ca_cert
}
output "cli_cert" {
sensitive = true
description = "The TLS certificate used for CLI authentication."
value = module.nomad.nomad_cli_cert
}
output "cli_key" {
sensitive = true
description = "The TLS private key used for CLI authentication."
value = module.nomad.nomad_cli_key
}
output "nomad_server_ip" {
description = "The Nomad server private IP."
value = module.nomad.server_internal_ips
}
output "load_balancer_ip" {
description = "The external ip address of the load balacner"
value = module.nomad.load_balancer_ip
}
We also need to drop usage of ca_ key_algorithm
in addition to key_algorithm
.
Thank you for the report, and apologies for the delay in fixing this (https://github.com/picatz/terraform-google-nomad/pull/59/commits/87d6c08945f11407a8948c0b6c26837e22725480). š
In step 4, right after executing the command 'terraform plan...' I have the output below, please how can I solve this problem?
Terraform v0.12.28
Warning: registry.terraform.io: This version of Terraform has an outdated GPG key and is unable to verify new provider releases. Please upgrade Terraform to at least 0.12.31 to receive new provider updates. For details see: https://discuss.hashicorp.com/t/hcsec-2021-12-codecov-security-event-and-hashicorp-gpg-key-exposure/23512
Error: Reference to undeclared output value
on outputs.tf line 4, in output "ca_cert": 4: value = module.nomad.ca_cert
An output value with the name "ca_cert" has not been declared in module.nomad.
Error: Reference to undeclared output value
on outputs.tf line 10, in output "cli_cert": 10: value = module.nomad.cli_cert
An output value with the name "cli_cert" has not been declared in module.nomad.
Error: Reference to undeclared output value
on outputs.tf line 16, in output "cli_key": 16: value = module.nomad.cli_key
An output value with the name "cli_key" has not been declared in module.nomad.
Error: Reference to undeclared output value
on outputs.tf line 38, in output "nomad_server_ip": 38: value = module.nomad.nomad_server_ip
An output value with the name "nomad_server_ip" has not been declared in module.nomad.
Terraform v0.12.31
Error: Reference to undeclared output value
on outputs.tf line 4, in output "ca_cert": 4: value = module.nomad.ca_cert
An output value with the name "ca_cert" has not been declared in module.nomad.
Error: Reference to undeclared output value
on outputs.tf line 10, in output "cli_cert": 10: value = module.nomad.cli_cert
An output value with the name "cli_cert" has not been declared in module.nomad.
Error: Reference to undeclared output value
on outputs.tf line 16, in output "cli_key": 16: value = module.nomad.cli_key
An output value with the name "cli_key" has not been declared in module.nomad.
Error: Reference to undeclared output value
on outputs.tf line 38, in output "nomad_server_ip": 38: value = module.nomad.nomad_server_ip
An output value with the name "nomad_server_ip" has not been declared in module.nomad.
Terraform v1.1.9 on linux_amd64
ā Warning: Argument is deprecated ā ā with module.nomad.tls_self_signed_cert.consul-ca, ā on .terraform/modules/nomad/consul_tls_ca.tf line 10, in resource "tls_self_signed_cert" "consul-ca": ā 10: key_algorithm = tls_private_key.consul-ca.algorithm ā ā This is now ignored, as the key algorithm is inferred from the
private_key_pem
. ā ā (and 13 more similar warnings elsewhere) āµ ā· ā Error: Unsupported attribute ā ā on outputs.tf line 4, in output "ca_cert": ā 4: value = module.nomad.ca_cert ā āāāāāāāāāāāāāāāāā ā ā module.nomad is a object, known only after apply ā ā This object does not have an attribute named "ca_cert". āµ ā· ā Error: Unsupported attribute ā ā on outputs.tf line 10, in output "cli_cert": ā 10: value = module.nomad.cli_cert ā āāāāāāāāāāāāāāāāā ā ā module.nomad is a object, known only after apply ā ā This object does not have an attribute named "cli_cert". āµ ā· ā Error: Unsupported attribute ā ā on outputs.tf line 16, in output "cli_key": ā 16: value = module.nomad.cli_key ā āāāāāāāāāāāāāāāāā ā ā module.nomad is a object, known only after apply ā ā This object does not have an attribute named "cli_key". āµ ā· ā Error: Unsupported attribute ā ā on outputs.tf line 38, in output "nomad_server_ip": ā 38: value = module.nomad.nomad_server_ip ā āāāāāāāāāāāāāāāāā ā ā module.nomad is a object, known only after apply ā ā This object does not have an attribute named "nomad_server_ip".