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_bedrock_guardrail: Convert content_policy_config.filters_config to Set #40304

Merged
merged 2 commits into from
Nov 26, 2024

Conversation

gdavison
Copy link
Contributor

@gdavison gdavison commented Nov 26, 2024

Description

The AWS API does not preserve the order of content_policy_config.filters_config`, which is causing a number of acceptance tests to fail.

Converts the parameter to a Set.

Closes #40041.

Previously

% make testacc PKG=bedrock TESTS=TestAccBedrockGuardrail_basic

    guardrail_test.go:32: Step 1/2 error: After applying this test step, the refresh plan was not empty.
        stdout
        
        
        Terraform used the selected providers to generate the following execution
        plan. Resource actions are indicated with the following symbols:
          ~ update in-place
        
        Terraform will perform the following actions:
        
          # aws_bedrock_guardrail.test will be updated in-place
          ~ resource "aws_bedrock_guardrail" "test" {
                name                      = "tf-acc-test-2877867950171300694"
                # (9 unchanged attributes hidden)
        
              ~ content_policy_config {
                  ~ filters_config {
                      ~ input_strength  = "HIGH" -> "MEDIUM"
                      ~ output_strength = "HIGH" -> "MEDIUM"
                      ~ type            = "VIOLENCE" -> "HATE"
                    }
                  ~ filters_config {
                      ~ input_strength  = "MEDIUM" -> "HIGH"
                      ~ output_strength = "MEDIUM" -> "HIGH"
                      ~ type            = "HATE" -> "VIOLENCE"
                    }
                }
        
                # (4 unchanged blocks hidden)
            }
        
        Plan: 0 to add, 1 to change, 0 to destroy.
--- FAIL: TestAccBedrockGuardrail_basic (12.90s)

Now

% make testacc PKG=bedrock TESTS=TestAccBedrockGuardrail_

--- PASS: TestAccBedrockGuardrail_disappears (14.13s)
--- PASS: TestAccBedrockGuardrail_basic (16.25s)
--- PASS: TestAccBedrockGuardrail_kmsKey (22.40s)
--- PASS: TestAccBedrockGuardrail_tags (27.57s)
--- PASS: TestAccBedrockGuardrail_update (33.76s)

@gdavison gdavison requested a review from a team as a code owner November 26, 2024 01:38
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 documentation Introduces or discusses updates to documentation. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/bedrock Issues and PRs that pertain to the bedrock service. prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. labels Nov 26, 2024
@ewbankkit
Copy link
Contributor

Needs a CHANGELOG entry as it fixes an open Issue.

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 🚀.

@gdavison gdavison merged commit dff0abb into main Nov 26, 2024
42 checks passed
@gdavison gdavison deleted the td-bedrock-guardrail-policy-sets branch November 26, 2024 18:42
@github-actions github-actions bot added this to the v5.78.0 milestone Nov 26, 2024
terraform-aws-provider bot pushed a commit that referenced this pull request Nov 26, 2024
Copy link

This functionality has been released in v5.78.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 github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Introduces or discusses updates to documentation. service/bedrock Issues and PRs that pertain to the bedrock service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
2 participants