-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
[Bug]: aws_macie2_invitation_accepter does not properly populate invitationId #40587
Comments
Community NoteVoting for Prioritization
Volunteering to Work on This Issue
|
Hey @kkrav3ts 👋 Thank you for taking the time to raise this! In order for this to be investigated, we'll need a sample configuration that can be used to reproduce this and/or debug logs (redacted as needed) so that whoever picks this up has the information they need. Are you able to provide some of that additional information? |
Sample configuration: terraform {
required_version = "~> 1.3"
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.0.0, < 6.0.0"
}
}
}
provider "aws" {
region = "eu-west-3"
profile = "main"
}
provider "aws" {
region = "eu-west-3"
profile = "secondary"
alias = "secondary"
}
locals {
main_acc_id = "148XXXXX176"
secondary_acc_id = "909XXXXXX087"
}
# Enable Macie in two accounts
resource "aws_macie2_account" "macie" {
finding_publishing_frequency = "FIFTEEN_MINUTES"
status = "ENABLED"
}
resource "aws_macie2_member" "macie" {
account_id = local.secondary_acc_id
email = "[email protected]"
invitation_message = "Sample Macie Test KYRYLO KRAVETS"
invite = true
depends_on = [aws_macie2_account.macie]
}
# Invite account SECONDARY from account MAIN
resource "aws_macie2_account" "macie2" {
provider = aws.secondary
finding_publishing_frequency = "FIFTEEN_MINUTES"
status = "ENABLED"
}
# Accept invitation from account MAIN on account SECONDARY
resource "aws_macie2_invitation_accepter" "macie2" {
depends_on = [aws_macie2_account.macie2]
provider = aws.secondary
administrator_account_id = local.main_acc_id
} Output:
However, all works good on version |
Terraform Core Version
1.9.8
AWS Provider Version
5.81.0
Affected Resource(s)
Expected Behavior
Invitation is accepted after issuing API call that contains populated invitation id like:
Actual Behavior
Invitation is not accepted because the API call does not contain proper invitation id, just empty string:
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
The text was updated successfully, but these errors were encountered: