generated from aws-ia/terraform-repo-template
-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
I am attempting to import manually created settings and manage them using this module. I am running into an issue where I am unable to import the guardduty admin account.
Here is the config.
...
admin_account_id = data.aws_caller_identity.current.account_id
auto_enable_organization_members = "NEW"
enable_kubernetes_protection = true
enable_malware_protection = true
enable_s3_protection = true
guardduty_detector_id = module.guardduty_detector.guardduty_detector.id
...Here is the error.
terragrunt import 'aws_guardduty_organization_admin_account.this[0]' '1234567890'
aws_guardduty_organization_admin_account.this[0]: Importing from ID "1234567890"...
aws_guardduty_organization_admin_account.this[0]: Import prepared!
Prepared aws_guardduty_organization_admin_account for import
aws_guardduty_organization_admin_account.this[0]: Refreshing state... [id=1234567890]
╷
│ Error: reading GuardDuty Organization Admin Account (1234567890): BadRequestException: The request failed because you are not the master account for your AWS Organization.
│ {
│ RespMetadata: {
│ StatusCode: 400,
│ RequestID: "e2db002a-e1d1-49af-93b9-cc4bde0b146f"
│ },
│ Message_: "The request failed because you are not the master account for your AWS Organization.",
│ Type: "InvalidInputException"
│ }I am not seeing a way in this module to skip the admin account resource creation and only import the org configuration, which I was able to import successfully. The account was delegated via the root account originally but I would like to manage all the config in the delegated account. Hopefully I am missing something?
Metadata
Metadata
Assignees
Labels
No labels