title: Terraform AWS Provider Error: Value for unconfigurable attribute. Can't configure a value for "acl": its value will be decided automatically
body: <p>Just today, whenever I run <code>terraform apply</code>, I see an error something like this: <code>Can't configure a value for &quot;lifecycle_rule&quot;: its value will be decided automatically based on the result of applying this configuration.</code></p>
  <p>It was working yesterday.</p>
  <p>Following is the command I run: <code>terraform init &amp;&amp; terraform apply</code></p>
  <p>Following is the list of initialized provider plugins:</p>
  <pre class="lang-sh prettyprint-override"><code>- Finding latest version of hashicorp/archive...
  - Finding latest version of hashicorp/aws...
  - Finding latest version of hashicorp/null...
  - Installing hashicorp/null v3.1.0...
  - Installed hashicorp/null v3.1.0 (signed by HashiCorp)
  - Installing hashicorp/archive v2.2.0...
  - Installed hashicorp/archive v2.2.0 (signed by HashiCorp)
  - Installing hashicorp/aws v4.0.0...
  - Installed hashicorp/aws v4.0.0 (signed by HashiCorp)
  </code></pre>
  <p>Following are the errors:</p>
  <pre class="lang-sh prettyprint-override"><code>Acquiring state lock. This may take a few moments...
  Releasing state lock. This may take a few moments...
  ╷
  │ Error: Value for unconfigurable attribute
  │ 
  │   with module.ssm-parameter-store-backup.aws_s3_bucket.this,
  │   on .terraform/modules/ssm-parameter-store-backup/s3_backup.tf line 1, in resource &quot;aws_s3_bucket&quot; &quot;this&quot;:
  │    1: resource &quot;aws_s3_bucket&quot; &quot;this&quot; {
  │ 
  │ Can't configure a value for &quot;lifecycle_rule&quot;: its value will be decided
  │ automatically based on the result of applying this configuration.
  ╵
  ╷
  │ Error: Value for unconfigurable attribute
  │ 
  │   with module.ssm-parameter-store-backup.aws_s3_bucket.this,
  │   on .terraform/modules/ssm-parameter-store-backup/s3_backup.tf line 1, in resource &quot;aws_s3_bucket&quot; &quot;this&quot;:
  │    1: resource &quot;aws_s3_bucket&quot; &quot;this&quot; {
  │ 
  │ Can't configure a value for &quot;server_side_encryption_configuration&quot;: its
  │ value will be decided automatically based on the result of applying this
  │ configuration.
  ╵
  ╷
  │ Error: Value for unconfigurable attribute
  │ 
  │   with module.ssm-parameter-store-backup.aws_s3_bucket.this,
  │   on .terraform/modules/ssm-parameter-store-backup/s3_backup.tf line 3, in resource &quot;aws_s3_bucket&quot; &quot;this&quot;:
  │    3:   acl    = &quot;private&quot;
  │ 
  │ Can't configure a value for &quot;acl&quot;: its value will be decided automatically
  │ based on the result of applying this configuration.
  ╵
  ERRO[0012] 1 error occurred:
          * exit status 1
  </code></pre>
  <p>My code is as follows:</p>
  <pre><code>resource &quot;aws_s3_bucket&quot; &quot;this&quot; {
    bucket = &quot;${var.project}-${var.environment}-ssm-parameter-store-backups-bucket&quot;
    acl    = &quot;private&quot;
  
    server_side_encryption_configuration {
      rule {
        apply_server_side_encryption_by_default {
          kms_master_key_id = data.aws_kms_key.s3.arn
          sse_algorithm     = &quot;aws:kms&quot;
        }
      }
    }
  
    lifecycle_rule {
      id      = &quot;backups&quot;
      enabled = true
  
      prefix = &quot;backups/&quot;
  
      transition {
        days          = 90
        storage_class = &quot;GLACIER_IR&quot;
      }
  
      transition {
        days          = 180
        storage_class = &quot;DEEP_ARCHIVE&quot;
      }
  
      expiration {
        days = 365
      }
    }
  
    tags = {
      Name        = &quot;${var.project}-${var.environment}-ssm-parameter-store-backups-bucket&quot;
      Environment = var.environment
    }
  }
  </code></pre>