-
Notifications
You must be signed in to change notification settings - Fork 14
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(resource): AWS consolidated CloudTrail support #43
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
afiune
added
resource
Something related to resources
feat
New feature or request
labels
Nov 24, 2020
afiune
changed the title
feat(resource): consolidated CloudTrail support
feat(resource): AWS consolidated CloudTrail support
Nov 24, 2020
afiune
added a commit
to lacework/go-sdk
that referenced
this pull request
Nov 24, 2020
This refactor is modifying the behavior of the Encode and Decode functions to use `[]byte` instead of `string`, this way we won't be casting its content back and forth like this example: lacework/terraform-provider-lacework#43 Additionally, I have made the `lacework integration show` command to display the account mapping content. ``` $ lacework int show TECHALLY_53DFFB3E788A30BD84AD1822B06473018B2B4CBA0C1AD4C INTEGRATION GUID | NAME | TYPE | STATUS | STATE -----------------------------------------------------------+--------------------------------+------------+---------+-------- TECHALLY_53DFFB3E788A30BD84AD1822B06473018B2B4CBA0C1AD4C | A consolidated CloudTrail | AWS_CT_SQS | Enabled | Ok INTEGRATION DETAILS ---------------------------------------------------------------------------------------------------------- ROLE ARN | arn:aws:iam::123483698038:role/lacework_iam_role EXTERNAL ID | bubulubu QUEUE URL | https://sqs.us-west-2.amazonaws.com/123483698038/lacework-ct-sqs-tech-ally ACCOUNT MAPPING FILE | { | "defaultLaceworkAccountAws": "mini-ally", | "integration_mappings": { | "customerdemo": { | "aws_accounts": [ | "934534535", | "553453453" | ] | }, | "tech-ally": { | "aws_accounts": [ | "774564564", | "234556677" | ] | } | } | } UPDATED AT | 2020-Nov-24 14:05:58 UTC UPDATED BY | [email protected] STATE UPDATED AT | 2020-Nov-24 14:06:02 UTC LAST SUCCESSFUL STATE | 2020-Nov-24 14:06:02 UTC ``` Signed-off-by: Salim Afiune Maya <[email protected]>
afiune
force-pushed
the
afiune/ALLY-235/account-mapping-file
branch
from
November 24, 2020 14:17
e76c018
to
f062d39
Compare
scottford-lw
approved these changes
Nov 30, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
afiune
added a commit
to lacework/go-sdk
that referenced
this pull request
Dec 2, 2020
This refactor is modifying the behavior of the Encode and Decode functions to use `[]byte` instead of `string`, this way we won't be casting its content back and forth like this example: lacework/terraform-provider-lacework#43 Additionally, I have made the `lacework integration show` command to display the account mapping content. ``` $ lacework int show TECHALLY_53DFFB3E788A30BD84AD1822B06473018B2B4CBA0C1AD4C INTEGRATION GUID | NAME | TYPE | STATUS | STATE -----------------------------------------------------------+--------------------------------+------------+---------+-------- TECHALLY_53DFFB3E788A30BD84AD1822B06473018B2B4CBA0C1AD4C | A consolidated CloudTrail | AWS_CT_SQS | Enabled | Ok INTEGRATION DETAILS ---------------------------------------------------------------------------------------------------------- ROLE ARN | arn:aws:iam::123483698038:role/lacework_iam_role EXTERNAL ID | bubulubu QUEUE URL | https://sqs.us-west-2.amazonaws.com/123483698038/lacework-ct-sqs-tech-ally ACCOUNT MAPPING FILE | { | "defaultLaceworkAccountAws": "mini-ally", | "integration_mappings": { | "customerdemo": { | "aws_accounts": [ | "934534535", | "553453453" | ] | }, | "tech-ally": { | "aws_accounts": [ | "774564564", | "234556677" | ] | } | } | } UPDATED AT | 2020-Nov-24 14:05:58 UTC UPDATED BY | [email protected] STATE UPDATED AT | 2020-Nov-24 14:06:02 UTC LAST SUCCESSFUL STATE | 2020-Nov-24 14:06:02 UTC ``` Signed-off-by: Salim Afiune Maya <[email protected]>
Signed-off-by: Salim Afiune Maya <[email protected]>
There has been a new release where the platform now supports consolidated CloudTrail integrations natively. https://support.lacework.com/hc/en-us/articles/360055993554-Setup-of-Organization-AWS-CloudTrail-Integration This change is updating the `lacework_integration_aws_ct` resource to support the Account Mapping File as well as marking the integration as Organization Level integration. Example: ```hcl resource "lacework_integration_aws_ct" "consolidated" { name = "A consolidated CloudTrail example" queue_url = "https://sqs.us-east-2.amazonaws.com/123456789012/MyQueue" credentials { role_arn = "arn:aws:iam::1234567890:role/lacework_iam_example_role" external_id = "12345" } org_account_mappings { default_lacework_account = "lw_account_1" mapping { lacework_account = "lw_account_2" aws_accounts = ["234556677", "774564564"] } mapping { lacework_account = "lw_account_3" aws_accounts = ["553453453", "934534535"] } } } ``` Jira: ALLY-235 Signed-off-by: Salim Afiune Maya <[email protected]>
Signed-off-by: Salim Afiune Maya <[email protected]>
The Lacework API doesn't return passwords/secrets, therefore we should not try to load them. Closes #42 Signed-off-by: Salim Afiune Maya <[email protected]>
afiune
force-pushed
the
afiune/ALLY-235/account-mapping-file
branch
from
December 2, 2020 21:11
c5bbb9f
to
5ea1e5d
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There has been a new release where the platform now supports
consolidated CloudTrail integrations natively.
https://support.lacework.com/hc/en-us/articles/360055993554-Setup-of-Organization-AWS-CloudTrail-Integration
This change is updating the
lacework_integration_aws_ct
resource tosupport the Account Mapping File as well as marking the integration as
Organization Level integration.
Example:
Jira: ALLY-235
Signed-off-by: Salim Afiune Maya [email protected]