Answers: <p>Guys I discovered what happened.
  It was necessary to apply these two resources that I informed (project_data and environment_data), but they were in the above directories and I was not aware.</p>
  
  <p>Something like this:</p>
  
  <pre><code>Application
  |
  |-Environment
    |-environment_data.tf
  |
  |- project_data.tf
  </code></pre>
  
Answers: CC BY-SA 4.0
Answers: 2020-03-20T13:37:18.400Z
Answers: 2020-03-20T13:37:18.400Z
Answers: Vader
Body: <p>When I try create a new resource using <code>terraform apply</code> (Terraform init was success) received an error:</p>
  
  <pre><code>data.terraform_remote_state.environment_data: Refreshing state...
  
  Error: Unable to find remote state
  
    on backend.tf line 15, in data "terraform_remote_state" "project_data":
    15: data "terraform_remote_state" "project_data" {
  
  No stored state was found for the given workspace in the given backend.
  
  
  Error: Unable to find remote state
  
    on backend.tf line 25, in data "terraform_remote_state" "environment_data":
    25: data "terraform_remote_state" "environment_data" {
  
  No stored state was found for the given workspace in the given backend.
  </code></pre>
  
  <p>And here is my point, it's a new resource the Terraform should be create the new tfstate in using my backend configuration in this case AWS S3.</p>
  
  <p>I have this same recipe in use to other resources running...</p>
  
  <p>Anyone can clarify me?</p>
  
Comments: CC BY-SA 4.0
Comments: 2020-03-18T20:06:19.953Z
Comments: Post some code please.
Comments: Mikael Dúi Bolinder
Tags: <terraform><amazon-s3>
Title: Error when creating new recource using backend AWS s3
UserDisplayName: Vader
ThreadText: # Error when creating new recource using backend AWS s3
  
  (Asked by: username_0 on 2020-03-18)
  
  When I try create a new resource using `terraform apply` (Terraform init was success) received an error:
  
  ```
  data.terraform_remote_state.environment_data: Refreshing state...
  
  Error: Unable to find remote state
  
    on backend.tf line 15, in data "terraform_remote_state" "project_data":
    15: data "terraform_remote_state" "project_data" {
  
  No stored state was found for the given workspace in the given backend.
  
  Error: Unable to find remote state
  
    on backend.tf line 25, in data "terraform_remote_state" "environment_data":
    25: data "terraform_remote_state" "environment_data" {
  
  No stored state was found for the given workspace in the given backend.
  
  ```
  
  And here is my point, it's a new resource the Terraform should be create the new tfstate in using my backend configuration in this case AWS S3.
  
  I have this same recipe in use to other resources running...
  
  Anyone can clarify me?
  
  **Tags:** terraform, amazon-s3
  
  > **Comments:**
  > **username_1**: Post some code please.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2020-03-20. Score: 1 | Accepted answer
  
  Guys I discovered what happened.
  It was necessary to apply these two resources that I informed (project\_data and environment\_data), but they were in the above directories and I was not aware.
  
  Something like this:
  
  ```
  Application
  |
  |-Environment
    |-environment_data.tf
  |
  |- project_data.tf
  
  ```
  
  
  ---
  
  