Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resource/aws_elasticache_replication_group, data_source/aws_elasticache_replication_group: Remove deprecated parameters #22903

Closed
anGie44 opened this issue Feb 2, 2022 · 4 comments
Labels
breaking-change Introduces a breaking change in current functionality; usually deferred to the next major release. enhancement Requests to existing resources that expand the functionality or scope.
Milestone

Comments

@anGie44
Copy link
Contributor

anGie44 commented Feb 2, 2022

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

The resource and data source aws_elasticache_replication_group have a number of deprecated parameters introduced as part of #18440. They should be removed in the next major release.

Resource:

  • number_cache_clusters
  • cluster_mode
  • replication_group_description

Data Source:

  • number_cache_clusters
  • replication_group_description
@anGie44 anGie44 added the enhancement Requests to existing resources that expand the functionality or scope. label Feb 2, 2022
@anGie44 anGie44 added this to the v5.0.0 milestone Feb 2, 2022
@anGie44 anGie44 added the breaking-change Introduces a breaking change in current functionality; usually deferred to the next major release. label Feb 2, 2022
@rquadling
Copy link
Contributor

rquadling commented Dec 2, 2022

Having an issue with these deprecated elements in that whilst the terraform plan output shows a warning

╷
│ Warning: Argument is deprecated
│ 
│   with aws_elasticache_replication_group.redis_sharded,
│   on [elasticache.tf](https://bitbucket.org/digitickets/inf-store/src/38a5d22d4f3bcfe70349478c299a38b9a8ed8174/elasticache.tf) line 42, in resource "aws_elasticache_replication_group" "redis_sharded":
│   42: resource "aws_elasticache_replication_group" "redis_sharded" {
│ 
│ Use num_node_groups and replicas_per_node_group instead
│ 
│ (and 4 more similar warnings elsewhere)
╵

Which isn't that useful as what are the other 4.

In addition, terraform validate isn't outputting these. Instead, I'm getting

{
  "format_version": "1.0",
  "valid": true,
  "error_count": 0,
  "warning_count": 0,
  "diagnostics": []
}

I've raised a question at https://discuss.hashicorp.com/t/where-are-warning-argument-is-deprecated-present-in-the-plan/47581 also to see if there's something I'm missing.

As an aside, the additional reporting we have in our pipeline has correctly shown up all the S3 related deprecations correctly and allowed us to successfully migrate all the deprecated aws_s3_buckets elements to their new resource counterparts.

So we assumed that the warnings that terraform plan is outputting would be present in the terraform validate -json output (just like the S3 ones where).

My IDE (PHPStorm) is aware of the deprecations:

image

But I'm not able to see anything in the terraform validate -json output that we have been relying on for a while.


Plan: 0 to add, 1 to change, 0 to destroy.
╷
│ Warning: Argument is deprecated
│ 
│   with aws_elasticache_replication_group.redis_sharded,
│   on elasticache.tf line 42, in resource "aws_elasticache_replication_group" "redis_sharded":
│   42: resource "aws_elasticache_replication_group" "redis_sharded" {
│ 
│ Use num_node_groups and replicas_per_node_group instead
│ 
│ (and 4 more similar warnings elsewhere)
╵

────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

Saved the plan to: terraform.tfplan

To perform exactly these actions, run the following command to apply:
    terraform apply "terraform.tfplan"

2022-12-02 19:06:23 ~/inf-store (master $%=) $ terraform validate -json
{
  "format_version": "1.0",
  "valid": true,
  "error_count": 0,
  "warning_count": 0,
  "diagnostics": []
}

[EDIT]

In conversation over on HashiCorp Discuss, it seems that I would expect to have the deprecated information displayed as part of terraform plan -json ... but I'm not seeing anything remotely related to the particular error that's being displayed as the output of terraform plan.

Is there anyone who can point out how this is being reported differently. I'm just not good enough at Go code to identify why terraform validate -json happily reported the S3 deprecations, but not the Elasticache ones.

[EDIT]

I've documented the terraform validate -json we wrote to help us https://gist.github.com/rquadling/ce42fbdf8b7b336512f80e2820c4cfab

@jar-b
Copy link
Member

jar-b commented May 23, 2023

Closed by #31008, merged to main via #31392

@jar-b jar-b closed this as completed May 23, 2023
@github-actions
Copy link

This functionality has been released in v5.0.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
breaking-change Introduces a breaking change in current functionality; usually deferred to the next major release. enhancement Requests to existing resources that expand the functionality or scope.
Projects
None yet
Development

No branches or pull requests

3 participants