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

feat: Add provisioned throughput support to aws_bedrockagent_agent_alias #37520

Conversation

acwwat
Copy link
Contributor

@acwwat acwwat commented May 15, 2024

Description

This PR is to add the provisioned_throughput argument to the routing_configuration block of the aws_bedrockagent_agent_alias resource. Note that it is cost prohibitive to test this feature, so I've added a test case but set it to skip similar to how it's done for the aws_bedrock_provisioned_model_throughput tests.

Relations

Closes #37489

References

Referred to AgentAliasRoutingConfigurationListItem for specs and wordings.

Output from Acceptance Testing

$ make testacc TESTS=TestAccBedrockAgentAgentAlias_ PKG=bedrockagent
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.2 test ./internal/service/bedrockagent/... -v -count 1 -parallel 20 -run='TestAccBedrockAgentAgentAlias_'  -timeout 360m
=== RUN   TestAccBedrockAgentAgentAlias_basic
=== PAUSE TestAccBedrockAgentAgentAlias_basic
=== RUN   TestAccBedrockAgentAgentAlias_disappears
=== PAUSE TestAccBedrockAgentAgentAlias_disappears
=== RUN   TestAccBedrockAgentAgentAlias_update
=== PAUSE TestAccBedrockAgentAgentAlias_update
=== RUN   TestAccBedrockAgentAgentAlias_routingUpdate
=== PAUSE TestAccBedrockAgentAgentAlias_routingUpdate
=== RUN   TestAccBedrockAgentAgentAlias_tags
=== PAUSE TestAccBedrockAgentAgentAlias_tags
=== RUN   TestAccBedrockAgentAgentAlias_provisionedThroughput
    agent_alias_test.go:227: Bedrock Provisioned Model Throughput for Antropic Claude 2 has a minimum 1 month commitment and costs > $45K/month
--- SKIP: TestAccBedrockAgentAgentAlias_provisionedThroughput (0.00s)
=== CONT  TestAccBedrockAgentAgentAlias_basic
=== CONT  TestAccBedrockAgentAgentAlias_routingUpdate
=== CONT  TestAccBedrockAgentAgentAlias_update
=== CONT  TestAccBedrockAgentAgentAlias_disappears
=== CONT  TestAccBedrockAgentAgentAlias_tags
--- PASS: TestAccBedrockAgentAgentAlias_disappears (31.74s)
--- PASS: TestAccBedrockAgentAgentAlias_basic (39.55s)
--- PASS: TestAccBedrockAgentAgentAlias_update (44.49s)
--- PASS: TestAccBedrockAgentAgentAlias_routingUpdate (51.30s)
--- PASS: TestAccBedrockAgentAgentAlias_tags (54.32s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/bedrockagent       54.532s

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/M 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/bedrockagent Issues and PRs that pertain to the bedrockagent service. labels May 15, 2024
@terraform-aws-provider terraform-aws-provider bot added needs-triage Waiting for first response or review from a maintainer. external-maintainer Contribution from a trusted external contributor. labels May 15, 2024
@acwwat acwwat force-pushed the f-aws_bedrockagent_agent_alias-add_provisioned_throughput_arg branch 2 times, most recently from 57b273c to 75a2e98 Compare May 15, 2024 06:24
@acwwat acwwat force-pushed the f-aws_bedrockagent_agent_alias-add_provisioned_throughput_arg branch from 75a2e98 to 66d3136 Compare May 15, 2024 06:38
@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 May 16, 2024
@ewbankkit ewbankkit requested a review from a team as a code owner July 18, 2024 16:17
@ewbankkit ewbankkit self-assigned this Jul 18, 2024
Copy link
Contributor

@ewbankkit ewbankkit 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=TestAccBedrockAgentAgentAlias_' PKG=bedrockagent ACCTEST_PARALLELISM=3
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.5 test ./internal/service/bedrockagent/... -v -count 1 -parallel 3  -run=TestAccBedrockAgentAgentAlias_ -timeout 360m
=== RUN   TestAccBedrockAgentAgentAlias_basic
=== PAUSE TestAccBedrockAgentAgentAlias_basic
=== RUN   TestAccBedrockAgentAgentAlias_disappears
=== PAUSE TestAccBedrockAgentAgentAlias_disappears
=== RUN   TestAccBedrockAgentAgentAlias_update
=== PAUSE TestAccBedrockAgentAgentAlias_update
=== RUN   TestAccBedrockAgentAgentAlias_routingUpdate
=== PAUSE TestAccBedrockAgentAgentAlias_routingUpdate
=== RUN   TestAccBedrockAgentAgentAlias_tags
=== PAUSE TestAccBedrockAgentAgentAlias_tags
=== RUN   TestAccBedrockAgentAgentAlias_provisionedThroughput
    agent_alias_test.go:227: Bedrock Provisioned Model Throughput for Antropic Claude 2 has a minimum 1 month commitment and costs > $45K/month
--- SKIP: TestAccBedrockAgentAgentAlias_provisionedThroughput (0.00s)
=== CONT  TestAccBedrockAgentAgentAlias_basic
=== CONT  TestAccBedrockAgentAgentAlias_routingUpdate
=== CONT  TestAccBedrockAgentAgentAlias_tags
--- PASS: TestAccBedrockAgentAgentAlias_basic (26.67s)
=== CONT  TestAccBedrockAgentAgentAlias_update
--- PASS: TestAccBedrockAgentAgentAlias_routingUpdate (39.23s)
=== CONT  TestAccBedrockAgentAgentAlias_disappears
--- PASS: TestAccBedrockAgentAgentAlias_tags (46.58s)
--- PASS: TestAccBedrockAgentAgentAlias_update (34.11s)
--- PASS: TestAccBedrockAgentAgentAlias_disappears (24.40s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/bedrockagent	68.499s

@ewbankkit
Copy link
Contributor

@acwwat Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit 752a0d8 into hashicorp:main Jul 18, 2024
49 checks passed
@github-actions github-actions bot added this to the v5.59.0 milestone Jul 18, 2024
Copy link

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

@acwwat acwwat deleted the f-aws_bedrockagent_agent_alias-add_provisioned_throughput_arg branch July 20, 2024 19:07
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 Aug 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. enhancement Requests to existing resources that expand the functionality or scope. external-maintainer Contribution from a trusted external contributor. service/bedrockagent Issues and PRs that pertain to the bedrockagent service. size/M Managed by automation to categorize the size of a PR. 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 provisioned throughput support to aws_bedrockagent_agent_alias resource
3 participants