title: Terraform, "ignore_changes" and sub-blocks
body: <p>I have a AWS CodePipeline configured in a terraform file, like this:</p>
  
  <pre><code>resource {
      name = "Cool Pipeline"
      ...
  
      stage {
          name = "Source"
          ...
  
          action {
              name = "Source"
              ...
  
              configuration {
                  Owner = "Me"
                  Repo = "&lt;git-repo-uri&gt;"
                  Branch = develop
                  OAuthToken = "b3287d649a28374e9283c749cc283ad74"
              }
          }
      }
  
      lifecycle {
          ignore_changes = "OAuthToken"
      }
  }
  </code></pre>
  
  <p>The reason for ignoring the token, is that the AWS API doesn't show that token to terraform, instead AWS API outputs this with <code>aws codepipeline get-pipeline &lt;name&gt;</code>:</p>
  
  <pre><code>"pipeline": {
      "stages": {
          "name": "Source",
          "actions": {
              "configuration": {
                  "OAuthToken": "****"
              }
          }
      }
  }
  </code></pre>
  
  <p>Result is, when I perform the <code>terraform plan</code>it shows me it wants to update that token, like so:</p>
  
  <pre><code>module.modulename.aws_codepipeline.codepipeline
        stage.0.action.0.configuration.%:          "3" =&gt; "4"
        stage.0.action.0.configuration.OAuthToken: "" =&gt; "b3287d649a28374e9283c749cc283ad74"
  </code></pre>
  
  <p>My question is, how can I get the <code>ignore_changes</code> to take effect? I've tried this without any success:</p>
  
  <pre><code>ignore_changes = ["OAuthToken"]
  ignore_changes = ["oauthtoken"]
  ignore_changes = ["stage.action.configuration.OAuthToken"]
  </code></pre>
  
  <p>All examples I've found googling just shows how to ignore on the same block level.</p>
  
  <p>(The token is this text is fake.)</p>