2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

[terraform]Error: Unable to find remote state の解決例

Posted at

出現したエラー文

% terraform plan
aws_acm_certificate.root: Refreshing state... [id=arn:aws:acm:ap-northeast-1:433411958845:certificate/4db953e8-c43c-450b-bcb6-7ad4df85af1d]
aws_acm_certificate_validation.root: Refreshing state... [id=2021-09-29 15:42:40 +0000 UTC]
aws_route53_record.certificate_validation["michi-tonodeai.com"]: Refreshing state... [id=Z01310772SIZK0R0THIAO__ef4e7925349877fd30a5f544529b6303.michi-tonodeai.com._CNAME]
╷
│ Error: Unable to find remote state
│ 
│   with data.terraform_remote_state.network_main,
│   on data.tf line 1, in data "terraform_remote_state" "network_main":
│    1: data "terraform_remote_state" "network_main" {
│ 
│ No stored state was found for the given workspace in the given backend.

原因

エラー文的に~/network/mainディレクトリ内に記述がない、またはミスがあるように見える。
実際はエラーを吐いているファイル内、特に指定箇所の中かっこ内にタイプミスがあった。

解決方法

エラー文の指定箇所の近くの記述に誤りがないか探してみる。
ミスがなければ指定ディレクトリ(今回で言えば~/network/mainディレクトリ)の中のファイルの記述を確認する。

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?