ampernetacle icon indicating copy to clipboard operation
ampernetacle copied to clipboard

Warning: Deprecated

Open RMorgado opened this issue 2 years ago • 1 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?

RMorgado avatar Aug 18 '22 20:08 RMorgado

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)

ricardolpires avatar Sep 15 '22 14:09 ricardolpires

Any solution or updates? Who could help me update it?

felipemartins210 avatar Sep 24 '22 21:09 felipemartins210

Any solution or updates? Who could help me update it?

no ;(

RMorgado avatar Sep 26 '22 20:09 RMorgado

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.

marciozotelli avatar Oct 19 '22 18:10 marciozotelli

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 :(

RMorgado avatar Oct 21 '22 21:10 RMorgado

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.

image

jrperin avatar Nov 27 '22 23:11 jrperin

I tried what you said but it didn't work.

RMorgado avatar Dec 08 '22 22:12 RMorgado

This should be fixed in c57f5ea !

jpetazzo avatar Dec 22 '22 01:12 jpetazzo

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.

image

this is solution in my case

Malgosiatobiasz1 avatar May 07 '24 10:05 Malgosiatobiasz1