Skip to content

Conversation

@chatko
Copy link

@chatko chatko commented Oct 17, 2025

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Closes IAM/AM-issues#3970

Description

This PR fixes an issue with the stringExists operator in subject attributes for IAM policy templates. The bug was in the comparison of the attributesItemModel.Value pointer to string literals without properly handling the value.

A test case was added that reproduces the issue by using the stringExists operator in subject attributes.

Acceptance Test Results

$ make testacc TESTARGS='-run=TestAccIBMIAMPolicyTemplateSubjectStringExists'

=== RUN   TestAccIBMIAMPolicyTemplateSubjectStringExists
--- PASS: TestAccIBMIAMPolicyTemplateSubjectStringExists (12.34s)
PASS
ok      github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/iampolicy     12.340s

Chris Hatko added 2 commits October 16, 2025 19:39
This fix addresses an issue where the stringExists operator in subject attributes was not working correctly. The bug was in the comparison of the attributesItemModel.Value pointer to string literals without dereferencing it first.

The fix dereferences the pointer before comparing it to the string literals 'true' and 'false'.

Added a test case that reproduces the issue by using stringExists operator in subject attributes.

Fixes IAM/AM-issues#3970
@hkantare
Copy link
Collaborator

Will review and plan for patch release

@chatko
Copy link
Author

chatko commented Oct 17, 2025

withdrawing fix ... will reopen later

@chatko chatko closed this Oct 17, 2025
@chatko chatko reopened this Oct 17, 2025
@chatko chatko changed the title Fix bug in stringExists operator in subject attributes for IAM policy templates (Not Essential) Fix bug in stringExists operator in subject attributes for IAM policy templates Oct 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants