2
respostas

Erro após adicionar segunda região

Prezados, encontrei o mesmo erro do colega do outro tópico ao executar o terraform plan após adicionar a região us-east-2, conforme demonstrado abaixo:

$ terraform plan

arning: Version constraints inside provider configuration blocks are deprecated

  on main.tf line 2, in provider "aws":
   2:   version = "~> 3.0"

Terraform 0.13 and earlier allowed provider version constraints inside the
provider configuration block, but that is now deprecated and will be removed
in a future version of Terraform. To silence this warning, move the provider
version constraint into the required_providers block.

(and one more similar warning elsewhere)


Warning: Interpolation-only expressions are deprecated

  on main.tf line 20, in resource "aws_instance" "dev":
  20:   vpc_security_group_ids = ["${aws_security_group.acesso-ssh.id}"]

Terraform 0.11 and earlier required all non-constant expressions to be
provided via interpolation syntax, but this pattern is now deprecated. To
silence this warning, remove the "${ sequence from the start and the }"
sequence from the end of this expression, leaving just the inner expression.

Template interpolation syntax is still used to construct strings from
expressions when the template includes multiple interpolation sequences or a
mixture of literal strings and interpolations. This deprecation applies only
to templates that consist entirely of a single interpolation sequence.

(and 3 more similar warnings elsewhere)


Warning: Quoted references are deprecated

  on main.tf line 45, in resource "aws_instance" "dev6":
  45:   provider = "aws.us-east-2"

In this context, references are expected literally rather than in quotes.
Terraform 0.11 and earlier required quotes, but quoted references are now
deprecated and will be removed in a future version of Terraform. Remove the
quotes surrounding this reference to silence this warning.

(and one more similar warning elsewhere)


Error: Could not load plugin


Plugin reinitialization required. Please run "terraform init".

Plugins are external binaries that Terraform uses to access and manipulate
resources. The configuration provided requires plugins which can't be located,
don't satisfy the version constraints, or are otherwise incompatible.

Terraform automatically discovers provider requirements from your
configuration, including providers used in child modules. To see the
requirements and constraints, run "terraform providers".

Failed to instantiate provider "registry.terraform.io/hashicorp/us-east-2" to
obtain schema: unknown provider "registry.terraform.io/hashicorp/us-east-2"

Tentei executar a ação sugerida na resposta, mas apresentou o seguinte erro:

$ terraform state replace-provider "registry.terraform.io/-/aws" "registry.terraform.io/hashicorp/aws"

No matching resources found.

2 respostas

Olá, Gustavo. Tudo bem?

Você pode mandar aqui o link para o tópico a que você se referiu?

Fico aguardando.

Olá Vitor,

Segue o link do tópico ao qual fiz referência.

Quer mergulhar em tecnologia e aprendizagem?

Receba a newsletter que o nosso CEO escreve pessoalmente, com insights do mercado de trabalho, ciência e desenvolvimento de software