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

Don't panic on missing role in consul_acl_role_policy_attachment #379

Merged
merged 1 commit into from
Nov 20, 2023

Commits on Nov 20, 2023

  1. Don't panic on missing role in consul_cal_role_policy_attachment

    `resourceConsulACLRolePolicyAttachmentCreate()` and `resourceConsulACLRolePolicyAttachmentDelete()`
    were not checking properly if the given role ID was not found in Consul.
    
    Some functions in the Consul SDK return an error when the object is missing,
    other return a `nil` object.
    
    In the case of `RoleRead()` I was checking for the wrong thing. I checked the
    rest of the ACL resources and as far as I know it, this was the only
    resource impacted.
    
    I also update the `consul_acl_policy` data source to use the new
    `PolicyReadByName()` function.
    remilapeyre committed Nov 20, 2023
    Configuration menu
    Copy the full SHA
    9b1eb97 View commit details
    Browse the repository at this point in the history