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

Prevent invalid policy_arns from being created. #1229

Merged
merged 1 commit into from
Nov 22, 2021

Commits on Nov 19, 2021

  1. Prevent invalid policy_arns from being created.

    With the update to TF SDKv2 calling schema.ResourceData.Get() on a
    TypeSet now returns nil. The previous code was testing for empty string,
    which resulted in the policy_arns being set to [""] in Vault when no
    policy_arns were specified in the TF code.
    
    The offending conditional was referencing the vestigial schema key named
    'policy_arn', which has now been removed.
    
    Additional fixes:
    - remove vestigial schema key `policy`
    - extend tests to cover reported failure mode
    - enhance other policy_arn tests
    - always validate the JSON policy document to avoid invalid input
    - update util.JsonDiffSuppress to log at the warn level rather than
      error, since the JSON parse errors non fatal
    benashz committed Nov 19, 2021
    Configuration menu
    Copy the full SHA
    397b6df View commit details
    Browse the repository at this point in the history