[Bug]: aws_macie2_invitation_accepter does not properly populate invitationId #40587
Open
Description
Terraform Core Version
1.9.8
AWS Provider Version
5.81.0
Affected Resource(s)
resource "aws_macie2_invitation_accepter" "member_accept" {
depends_on = [aws_macie2_account.member_account]
administrator_account_id = "011122233344"
}
Expected Behavior
Invitation is accepted after issuing API call that contains populated invitation id like:
"requestParameters": {
"administratorAccountId": "011122233344",
"invitationId": "b6c9e81cc0c310b3484111032b0f3e32"
},
Actual Behavior
Invitation is not accepted because the API call does not contain proper invitation id, just empty string:
"requestParameters": {
"administratorAccountId": "011122233344",
"invitationId": ""
},
Relevant Error/Panic Output Snippet
Error: accepting Macie InvitationAccepter (): operation error Macie2: AcceptInvitation, https response error StatusCode: 400, RequestID: 516a23b3-909e-4fdd-9f6e-ff6e8033968a, ValidationException: The request is rejected because the current account has no pending invitation from the given master account ID or is already an associated member of another master account.
Terraform Configuration Files
n/a
Steps to Reproduce
n/a
Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
No