You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Switch your Terraform configuration to the `aws_s3_bucket_server_side_encryption_configuration` resource instead.
1047
+
1048
+
For example, given this previous configuration:
1049
+
1050
+
```terraform
1051
+
resource "aws_s3_bucket" "example" {
1052
+
# ... other configuration ...
1053
+
server_side_encryption_configuration {
1054
+
rule {
1055
+
apply_server_side_encryption_by_default {
1056
+
kms_master_key_id = aws_kms_key.mykey.arn
1057
+
sse_algorithm = "aws:kms"
1058
+
}
1059
+
}
1060
+
}
1061
+
}
1062
+
```
1063
+
1064
+
It will receive the following error after upgrading:
1065
+
1066
+
```
1067
+
│ Error: Value for unconfigurable attribute
1068
+
│
1069
+
│ with aws_s3_bucket.example,
1070
+
│ on main.tf line 1, in resource "aws_s3_bucket" "example":
1071
+
│ 1: resource "aws_s3_bucket" "example" {
1072
+
│
1073
+
│ Can't configure a value for "server_side_encryption_configuration": its value will be decided automatically based on the result of applying this configuration.
1074
+
```
1075
+
1076
+
Since the `server_side_encryption_configuration` argument changed to read-only, the recommendation is to update the configuration to use the `aws_s3_bucket_server_side_encryption_configuration`
1077
+
resource and remove any references to `server_side_encryption_configuration` and its nested arguments in the `aws_s3_bucket` resource:
0 commit comments