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

feat: add org-cloudtrail to lw_generate #1433

Merged

Conversation

dmurray-lacework
Copy link
Collaborator

@dmurray-lacework dmurray-lacework commented Nov 3, 2023

Branched from #1424

Summary

Add support for organization cloudtrail setting in the lw_generate cloudtrail module

  source  = "lacework/cloudtrail/aws"
  version = "2.8.0"

  is_organization_trail = true

    org_account_mappings = [{
        default_lacework_account = "main"
        
        mapping = [
            {
                lacework_account = "lw-sub-account"
                aws_accounts     = "123456789011"
            },
        ]
    }]
}

How did you test this change?

  • integration/aws_generation_test.go
    • TestGenerationAwsCloudtrailOrganization
    • TestGenerationCloudtrailOrgMappingsNonInteractive
    • TestGenerationAwsCloudtrailOrganizationAccountMappings

Issue

https://lacework.atlassian.net/browse/GROW-2504

@dmurray-lacework dmurray-lacework force-pushed the dmurray-lacework/GROW-2549/org-cloudtrail-generate branch from 1c3e030 to 56ad547 Compare November 6, 2023 09:56
@dmurray-lacework dmurray-lacework marked this pull request as ready for review November 6, 2023 11:24
@dmurray-lacework dmurray-lacework requested a review from a team as a code owner November 6, 2023 11:24
@dmurray-lacework dmurray-lacework force-pushed the dmurray-lacework/GROW-2549/org-cloudtrail-generate branch 4 times, most recently from 8470cb5 to c797ed2 Compare November 10, 2023 12:14
Copy link
Contributor

@PengyuanZhao PengyuanZhao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Have we tested this using our AWS organization account?

@dmurray-lacework
Copy link
Collaborator Author

LGTM. Have we tested this using our AWS organization account?

Jamie has done some testing of the cloudtrail terraform with main output with his own account.

We need to release the cloudtrail module for before we merge this.

@dmurray-lacework
Copy link
Collaborator Author

LGTM. Have we tested this using our AWS organization account?

An issue with testing. The LW provider block needs to have the organization = true setting

@dmurray-lacework dmurray-lacework force-pushed the dmurray-lacework/GROW-2549/org-cloudtrail-generate branch from 131c1da to 1de31b3 Compare November 13, 2023 15:03
Signed-off-by: Darren Murray <darren.murray@lacework.net>

feat: cloudtrail org account mapping

Signed-off-by: Darren Murray <darren.murray@lacework.net>
@dmurray-lacework dmurray-lacework force-pushed the dmurray-lacework/GROW-2549/org-cloudtrail-generate branch from 1de31b3 to 43427f6 Compare November 13, 2023 17:10
@dmurray-lacework dmurray-lacework merged commit 29935df into main Nov 13, 2023
2 checks passed
@dmurray-lacework dmurray-lacework deleted the dmurray-lacework/GROW-2549/org-cloudtrail-generate branch November 13, 2023 17:34
@lacework-releng lacework-releng mentioned this pull request Nov 13, 2023
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