Updated the Terraform AWS provider from v3.41.0 to v3.75.2 . I had created a module for aws_s3_bucket which contains cors_rule, replication_configuration, server_side_encyption_configuration, liffecycle_rule, versioning, and logging parameters, which has now been deprecated and converted to the resources.
When I call this module to create a S3 bucket, It successfully creates the bucket.
Every time when terraform plan or apply is executed above mentioned resources are set to null irrespective of the values mentioned in the code, but when verified from the AWS console, no changes were made to the s3 bucket.
What can be the possible reason for this problem and how can it be resolved?
This is a part of the output generated after the terraform plan, as following output is setting the values to null, but after terraform apply these values are not set null verified from AWS console.