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

New Resource aws_elasticache_serverless_cache #34951

Merged
merged 32 commits into from
Jan 3, 2024

Conversation

meetreks
Copy link
Contributor

Description

This PR is to add a new resource aws_eelasticache_serverless to the ElasicCache Family.

Relations

Closes #34590

References

Announcement
API Reference

Output from Acceptance Testing

% make testacc TESTS=TestAccXXX PKG=ec2

...

$ make testacc PKG=elasticache TESTS=TestAccServerlessElastiCache_
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/elasticache/... -v -count 1 -parallel 20 -run='TestAccServerlessElastiCache_' -timeout 360m
=== RUN TestAccServerlessElastiCache_basic
=== PAUSE TestAccServerlessElastiCache_basic
=== RUN TestAccServerlessElastiCache_basicRedis
=== PAUSE TestAccServerlessElastiCache_basicRedis
=== RUN TestAccServerlessElastiCache_full
=== PAUSE TestAccServerlessElastiCache_full
=== RUN TestAccServerlessElastiCache_fullRedis
=== PAUSE TestAccServerlessElastiCache_fullRedis
=== RUN TestAccServerlessElastiCache_update
=== PAUSE TestAccServerlessElastiCache_update
=== RUN TestAccServerlessElastiCache_dissapears
=== PAUSE TestAccServerlessElastiCache_dissapears
=== CONT TestAccServerlessElastiCache_basic
=== CONT TestAccServerlessElastiCache_fullRedis
=== CONT TestAccServerlessElastiCache_dissapears
=== CONT TestAccServerlessElastiCache_full
=== CONT TestAccServerlessElastiCache_update
=== CONT TestAccServerlessElastiCache_basicRedis
--- PASS: TestAccServerlessElastiCache_dissapears (351.69s)
--- PASS: TestAccServerlessElastiCache_basic (390.85s)
--- PASS: TestAccServerlessElastiCache_basicRedis (439.94s)
--- PASS: TestAccServerlessElastiCache_full (468.11s)
--- PASS: TestAccServerlessElastiCache_fullRedis (469.44s)
--- PASS: TestAccServerlessElastiCache_update (516.67s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/elasticache 516.814s

Copy link

Community Note

Voting for Prioritization

  • Please vote on this pull request by adding a 👍 reaction to the original post to help the community and maintainers prioritize this pull request.
  • Please see our prioritization guide for information on how we prioritize.
  • 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.

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added size/XL Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/elasticache Issues and PRs that pertain to the elasticache service. generators Relates to code generators. and removed size/XL Managed by automation to categorize the size of a PR. labels Dec 15, 2023
@terraform-aws-provider terraform-aws-provider bot added needs-triage Waiting for first response or review from a maintainer. partner Contribution from a partner. labels Dec 15, 2023
@junoriosity
Copy link

junoriosity commented Dec 18, 2023

@meetreks I really would love to make use of the aws_elasticache_serverless resource. Many thanks for all your great support. 🙂

Could you tell me, when this will be possible?

@justinretzolk justinretzolk added enhancement Requests to existing resources that expand the functionality or scope. and removed needs-triage Waiting for first response or review from a maintainer. labels Dec 18, 2023
@meetreks
Copy link
Contributor Author

@ewbankkit when you get a min, can you kindly review and merge please?

daily_snapshot_time = "09:00"
description = "Test Server"
kms_key_id = aws_kms_key.test.arn
major_engine_version = "1.6"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be something like 7.1 imo

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah -- you are right, its a copy pasta error butt fixed it now. I ran the testts with verssion 7 and amended to the same. For some reason when I ran the tests it said engine version 7.1 is not supported.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@meetreks i believe it should be engine version 7. Was trying out awscc provider elasticache serverless resource earlier and it only accepted 7 not 7.1 for major engine version.

@johnsonaj
Copy link
Contributor

Hi @meetreks 👋🏾 , thank you for the contribution! A policy change was made earlier this year that now requires all net-new resources to be written using the Terraform Plugin Framework. Since this is a new resource, it will need to be converted to using the Framework. You can always reference the Contributor Guide when choosing which plugin version to use.

The migration guild should help with getting started when moving this SDKv2 resource to Framework. Please reach out if there are any issues.

@meetreks
Copy link
Contributor Author

@johnsonaj you mean I need to discard the current changes and regen using SDK V2?

@noizo
Copy link

noizo commented Dec 27, 2023

@johnsonaj you mean I need to discard the current changes and regen using SDK V2?

I think it's about migrating from SDK V2 to https://developer.hashicorp.com/terraform/plugin/framework
Do You plan to continue work on it?

@meetreks
Copy link
Contributor Author

@johnsonaj you mean I need to discard the current changes and regen using SDK V2?

I think it's about migrating from SDK V2 to https://developer.hashicorp.com/terraform/plugin/framework Do You plan to continue work on it?

Yes I am, but having issues with using tfsdk2fw to scaffold the v1 SDK to use new version of the plugin framework

Copy link

github-actions bot commented Jan 2, 2024

Thank you for your contribution! 🚀

Please note that typically Go dependency changes are handled in this repository by dependabot or the maintainers. This is to prevent pull request merge conflicts and further delay reviews of contributions. Remove any changes to the go.mod or go.sum files and commit them into this pull request.

Additional details:

  • Check open pull requests with the dependencies label to view other dependency updates.
  • If this pull request includes an update the AWS Go SDK (or any other dependency) version, only updates submitted via dependabot will be merged. This pull request will need to remove these changes and will need to be rebased after the existing dependency update via dependabot has been merged for this pull request to be reviewed.
  • If this pull request is for supporting a new AWS service:
    • Ensure the new AWS service changes are following the Contributing Guide section on new services, in particular that the dependency addition and initial provider support are in a separate pull request from other changes (e.g. new resources). Contributions not following this item will not be reviewed until the changes are split.
    • If this pull request is already a separate pull request from the above item, you can ignore this message.

Copy link
Contributor

@johnsonaj johnsonaj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

% make testacc TESTARGS='-run=TestAccElastiCacheServerlessCache_' PKG=elasticache

==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/elasticache/... -v -count 1 -parallel 20  -run=TestAccElastiCacheServerlessCache_ -timeout 360m
--- PASS: TestAccElastiCacheServerlessCache_disappears (329.98s)
--- PASS: TestAccElastiCacheServerlessCache_fullRedis (341.09s)
--- PASS: TestAccElastiCacheServerlessCache_basic (343.06s)
--- PASS: TestAccElastiCacheServerlessCache_basicRedis (396.92s)
--- PASS: TestAccElastiCacheServerlessCache_full (420.86s)
--- PASS: TestAccElastiCacheServerlessCache_update (433.63s)
--- PASS: TestAccElastiCacheServerlessCache_tags (480.97s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/elasticache	484.543s

@aokellermann
Copy link

@johnsonaj thanks for your work on this! any idea when this feature will be released?

@johnsonaj johnsonaj changed the title New Resource aws_elasticache_serverless New Resource aws_elasticache_serverless_cache Jan 3, 2024
@github-actions github-actions bot added size/XL Managed by automation to categorize the size of a PR. client-connections Pertains to the AWS Client and service connections. and removed size/XL Managed by automation to categorize the size of a PR. labels Jan 3, 2024
@johnsonaj johnsonaj merged commit 7230c4b into hashicorp:main Jan 3, 2024
59 checks passed
@johnsonaj
Copy link
Contributor

@meetreks thank you for the contribution! 🎉

@github-actions github-actions bot added this to the v5.32.0 milestone Jan 3, 2024
@minhhieu76qng
Copy link

minhhieu76qng commented Jan 8, 2024

@johnsonaj Thanks for your works. Could you tell us when this resource will be released?

@johnsonaj
Copy link
Contributor

@johnsonaj Thanks for your works. Could you tell us when this resource will be released?

Hi @minhhieu76qng. This resource will be available in this week's release, v5.32.0

Copy link

This functionality has been released in v5.32.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!

@autarchprinceps
Copy link

I don't think its quite working yet

╷
│ Error: Provider produced inconsistent result after apply
│ 
│ When applying changes to module.elasticache.aws_elasticache_serverless_cache.cache, provider
│ "provider[\"registry.terraform.io/hashicorp/aws\"]" produced an unexpected new value: .cache_usage_limits: block count changed
│ from 1 to 0.
│ 
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.

@autarchprinceps
Copy link

A feature like name_prefix instead of hardcoding a name and having to delete then recreate would be helpful as well.
Is there a particular reason the (read_)endpoint is a list, despite only ever containing one entry?

Copy link

I'm going to lock this pull request 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 related to this change, 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 Feb 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
client-connections Pertains to the AWS Client and service connections. documentation Introduces or discusses updates to documentation. enhancement Requests to existing resources that expand the functionality or scope. generators Relates to code generators. partner Contribution from a partner. prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. service/elasticache Issues and PRs that pertain to the elasticache service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Enhancement]: Add support for ElastiCache Serverless
10 participants