Warning: Deprecated
RMorgado opened this issue · comments
When I run the command "terraform plan" I get the following warnings:
╷
│ Warning: Deprecated attribute
│
│ on cloudinit.tf line 39, in data "cloudinit_config" "_":
│ 39: ${indent(8, data.http.apt_repo_key.body)}
│
│ The attribute "body" is deprecated. Refer to the provider documentation for details.
│
│ (and 4 more similar warnings elsewhere)
╵
╷
│ Warning: Content-Type is not recognized as a text type, got "application/pgp-keys"
│
│ with data.http.apt_repo_key,
│ on cloudinit.tf line 147, in data "http" "apt_repo_key":
│ 147: data "http" "apt_repo_key" {
│
│ If the content is binary data, Terraform may not properly handle the contents of the response.
╵
╷
│ Warning: Argument is deprecated
│
│ with random_string.token1,
│ on cloudinit.tf line 158, in resource "random_string" "token1":
│ 158: number = true
│
│ Use numeric instead.
│
│ (and 3 more similar warnings elsewhere)
I tried running the command "" and it worked.
I ran the command "export KUBECONFIG=$PWD/kubeconfig" but when I run "Kubectl get nodes" it gives an error:
The connection to the server localhost:8080 was refused - did you specify the right host or port?
I already checked and I have the right kubectl configuration.
Anyone else with these problems?
I'm also getting the same warning:
Warning: Deprecated attribute
│
│ on cloudinit.tf line 39, in data "cloudinit_config" "_":
│ 39: ${indent(8, data.http.apt_repo_key.body)}
│
│ The attribute "body" is deprecated. Refer to the provider documentation for details.
│
│ (and 4 more similar warnings elsewhere)
╵
╷
│ Warning: Content-Type is not recognized as a text type, got "application/pgp-keys"
│
│ with data.http.apt_repo_key,
│ on cloudinit.tf line 147, in data "http" "apt_repo_key":
│ 147: data "http" "apt_repo_key" {
│
│ If the content is binary data, Terraform may not properly handle the contents of the response.
╵
╷
│ Warning: Argument is deprecated
│
│ with random_string.token1,
│ on cloudinit.tf line 158, in resource "random_string" "token1":
│ 158: number = true
│
│ Use numeric instead.
│
│ (and 3 more similar warnings elsewhere)
Any solution or updates? Who could help me update it?
Any solution or updates? Who could help me update it?
no ;(
If you are using the latest version of Terraform try switching to 1.1.9.
I installed Tfenv and changed the version and it worked.
If you are using the latest version of Terraform try switching to 1.1.9. I installed Tfenv and changed the version and it worked.
I followed the steps but still with the same error :(
Hi guys, do you still having that problem with `.body?
The answer is here: https://registry.terraform.io/providers/hashicorp/http/latest/docs/data-sources/http
It is only necessary changing .body
by .response_body
.
I tried what you said but it didn't work.
This should be fixed in c57f5ea !
Hi guys, do you still having that problem with `.body?
The answer is here: https://registry.terraform.io/providers/hashicorp/http/latest/docs/data-sources/http
It is only necessary changing
.body
by.response_body
.
this is solution in my case