Skip to content

Conversation

bdolman
Copy link

@bdolman bdolman commented Oct 17, 2024

There were two changes that needed to happen to get rid of the warnings:

  1. Replace aws_s3_bucket_object (now deprecated) to aws_bucket_object
  2. Remove ignore_changes

The individual commits contain more information about each of those changes.

Note that the change from aws_s3_bucket_object to aws_bucket_object will result in the resource being recreated, so that may a consideration when changing the version number.

From the Terraform docs:

The aws_s3_bucket_object resource is DEPRECATED and will be removed in
a future version! Use aws_s3_object instead, where new features and
fixes will be added. When replacing aws_s3_bucket_object with
aws_s3_object in your configuration, on the next apply, Terraform will
recreate the object. If you prefer to not have Terraform recreate
the object, import the object using aws_s3_object.
According to Terraform, the way this is being used has no effect and
can be removed:

Warning: Redundant ignore_changes element

Adding an attribute name to ignore_changes tells Terraform to ignore
future changes to the argument in configuration after the object has
been created, retaining the value originally configured.

The attribute last_modified is decided by the provider alone and
therefore there can be no configured value to compare with. Including
this attribute in ignore_changes has no effect. Remove the attribute
from ignore_changes to quiet this warning.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant