Argument is deprecated
marianafalcho opened this issue Β· comments
Before you submit an issue, please perform the following first:
- Remove the local
.terraform
directory (! ONLY if state is stored remotely, which hopefully you are following that best practice!):rm -rf .terraform/
Done - Re-initialize the project root to pull down modules:
terraform init
Done - Re-attempt your terraform plan or apply and check if the issue still persists Done
Versions
- Module version [Required]:
version = "2.14.1"
- Terraform version:
Terraform v1.1.7
on darwin_amd64
+ provider registry.terraform.io/hashicorp/aws v3.75.0
- Provider version(s):
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 3.69"
}
}
}
Reproduction Code [Required]
This is my code
module "s3_bucket" {
source = "terraform-aws-modules/s3-bucket/aws"
version = "2.14.1"
bucket = "${data.aws_iam_account_alias.current.account_alias}-results"
block_public_acls = true
block_public_policy = true
ignore_public_acls = true
restrict_public_buckets = true
lifecycle_rule = [
{
id = "canary_wip_results_cleanup"
enabled = true
prefix = "canary_wip/"
transition = [
{
days = 15
storage_class = "STANDARD_IA"
}
]
expiration = {
days = 30
}
}
]
server_side_encryption_configuration = {
rule = {
apply_server_side_encryption_by_default = {
sse_algorithm = "AES256"
}
}
}
}
Steps to reproduce the behavior:
No Yes- Created code
- Ran
terraform init
. I did this twice to troubleshoot and ensure the provider was properly installed - Ran
terraform plan
. Got error:
β Warning: Argument is deprecated
β
β with module.s3_bucket.aws_s3_bucket.this,
β on .terraform/modules/s3_bucket/main.tf line 5, in resource "aws_s3_bucket" "this":
β 5: resource "aws_s3_bucket" "this" {
β
β Use the aws_s3_bucket_website_configuration resource instead
β
β (and 27 more similar warnings elsewhere)
Expected behavior
No warning to be shown.
Actual behavior
Warning:
β Warning: Argument is deprecated
β
β with module.cloudwatch_synthetic_canaries_prod_s3_bucket.aws_s3_bucket.this,
β on .terraform/modules/cloudwatch_synthetic_canaries_prod_s3_bucket/main.tf line 5, in resource "aws_s3_bucket" "this":
β 5: resource "aws_s3_bucket" "this" {
β
β Use the aws_s3_bucket_website_configuration resource instead
β
β (and 27 more similar warnings elsewhere)
Additional context
Just trying to create 2 buckets using this module and I get the warning listed above.
I'm still seeing this warning using module version 3.0.1
and aws provider version 4.9.0
on terraform 1.1.7
. I've run both terraform init -upgrade
and deleted the .terraform
folder for a clean init
but still see the warning when I run terraform validate
or plan
. Is there an additional fix needed for provider version 4.9.0
?
I'm going to lock this issue because it has been closed for 30 days β³. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.