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

Fix aws_securitylake_subscriber to accept more than one source blocks #36268

Merged
merged 24 commits into from
May 3, 2024

Conversation

lawliet89
Copy link
Contributor

@lawliet89 lawliet89 commented Mar 8, 2024

Description

Fix aws_securitylake_subscriber to accept more than one source blocks

{
    "subscriber": {
        "accessTypes": [
            "LAKEFORMATION"
        ],
        "createdAt": "2023-07-17T02:56:50.655560+00:00",
        "resourceShareArn": "arn:aws:ram:ap-southeast-1:xxxxxx:resource-share/xxx",
        "resourceShareName": "LakeFormation-xxxx",
        "sources": [
            {
                "awsLogSource": {
                    "sourceName": "CLOUD_TRAIL_MGMT",
                    "sourceVersion": "2.0"
                }
            },
            {
                "awsLogSource": {
                    "sourceName": "LAMBDA_EXECUTION",
                    "sourceVersion": "2.0"
                }
            },
            {
                "awsLogSource": {
                    "sourceName": "EKS_AUDIT",
                    "sourceVersion": "2.0"
                }
            },
            {
                "awsLogSource": {
                    "sourceName": "ROUTE53",
                    "sourceVersion": "2.0"
                }
            },
            {
                "awsLogSource": {
                    "sourceName": "SH_FINDINGS",
                    "sourceVersion": "2.0"
                }
            },
            {
                "awsLogSource": {
                    "sourceName": "VPC_FLOW",
                    "sourceVersion": "2.0"
                }
            },
            {
                "awsLogSource": {
                    "sourceName": "S3_DATA",
                    "sourceVersion": "2.0"
                }
            },
            {
                "awsLogSource": {
                    "sourceName": "CLOUD_TRAIL_MGMT",
                    "sourceVersion": "1.0"
                }
            },
            {
                "awsLogSource": {
                    "sourceName": "LAMBDA_EXECUTION",
                    "sourceVersion": "1.0"
                }
            },
            {
                "awsLogSource": {
                    "sourceName": "S3_DATA",
                    "sourceVersion": "1.0"
                }
            },
            {
                "awsLogSource": {
                    "sourceName": "VPC_FLOW",
                    "sourceVersion": "1.0"
                }
            },
            {
                "awsLogSource": {
                    "sourceName": "ROUTE53",
                    "sourceVersion": "1.0"
                }
            },
            {
                "awsLogSource": {
                    "sourceName": "SH_FINDINGS",
                    "sourceVersion": "1.0"
                }
            }
        ],
        "subscriberArn": "arn:aws:securitylake:ap-southeast-1:xxxx:subscriber/xxxx",
        "subscriberDescription": "",
        "subscriberId": "xxx",
        "subscriberIdentity": {
            "externalId": "xxx",
            "principal": "xxx"
        },
        "subscriberName": "example",
        "subscriberStatus": "ACTIVE",
        "updatedAt": "2024-03-01T02:52:42.318384+00:00"
    }

Closes #36688

Copy link

github-actions bot commented Mar 8, 2024

Community Note

Voting for Prioritization

  • Please vote on this pull request by adding a 👍 reaction to the original post to help the community and maintainers prioritize this pull request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added size/XS Managed by automation to categorize the size of a PR. service/securitylake Issues and PRs that pertain to the securitylake service. labels Mar 8, 2024
@terraform-aws-provider terraform-aws-provider bot added the needs-triage Waiting for first response or review from a maintainer. label Mar 8, 2024
@justinretzolk justinretzolk added bug Addresses a defect in current functionality. and removed needs-triage Waiting for first response or review from a maintainer. labels Mar 8, 2024
@edgar-avetisyan-vay
Copy link

Hi, when we are expecting this to be merged?

@gdavison gdavison self-assigned this Apr 24, 2024
@terraform-aws-provider terraform-aws-provider bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Apr 24, 2024
@gdavison gdavison force-pushed the b-seclake-subscriber-source-count branch from d9f424d to 6a2d9ac Compare May 3, 2024 00:46
Copy link
Contributor

@gdavison gdavison left a comment

Choose a reason for hiding this comment

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

Thanks for the PR, @lawliet89.

I added a test for multiple sources, so I had to make a number of changes to other resources. I also changed sources from a List to Set, since order doesn't matter.

--- PASS: TestAccSecurityLake_serial (1839.56s)
--- PASS: TestAccSecurityLake_serial/SubscriberNotification (294.61s)
--- PASS: TestAccSecurityLake_serial/SubscriberNotification/https (61.40s)
--- PASS: TestAccSecurityLake_serial/SubscriberNotification/disappears (64.29s)
--- PASS: TestAccSecurityLake_serial/SubscriberNotification/update (109.56s)
--- PASS: TestAccSecurityLake_serial/SubscriberNotification/basic (59.36s)
--- PASS: TestAccSecurityLake_serial/AWSLogSource (333.46s)
--- PASS: TestAccSecurityLake_serial/AWSLogSource/basic (53.88s)
--- PASS: TestAccSecurityLake_serial/AWSLogSource/disappears (44.63s)
--- PASS: TestAccSecurityLake_serial/AWSLogSource/multiple (89.59s)
--- PASS: TestAccSecurityLake_serial/AWSLogSource/multiRegion (84.90s)
--- PASS: TestAccSecurityLake_serial/AWSLogSource/sourceVersion (60.46s)
--- PASS: TestAccSecurityLake_serial/CustomLogSource (291.51s)
--- PASS: TestAccSecurityLake_serial/CustomLogSource/basic (49.82s)
--- PASS: TestAccSecurityLake_serial/CustomLogSource/disappears (47.63s)
--- PASS: TestAccSecurityLake_serial/CustomLogSource/eventClasses (77.64s)
--- PASS: TestAccSecurityLake_serial/CustomLogSource/multiple (53.29s)
--- PASS: TestAccSecurityLake_serial/CustomLogSource/sourceVersion (63.13s)
--- PASS: TestAccSecurityLake_serial/DataLake (349.35s)
--- PASS: TestAccSecurityLake_serial/DataLake/basic (44.45s)
--- PASS: TestAccSecurityLake_serial/DataLake/disappears (42.28s)
--- PASS: TestAccSecurityLake_serial/DataLake/tags (61.22s)
--- PASS: TestAccSecurityLake_serial/DataLake/lifecycle (48.26s)
--- PASS: TestAccSecurityLake_serial/DataLake/lifecycleUpdate (77.22s)
--- PASS: TestAccSecurityLake_serial/DataLake/replication (75.93s)
--- PASS: TestAccSecurityLake_serial/Subscriber (570.64s)
--- PASS: TestAccSecurityLake_serial/Subscriber/basic (49.37s)
--- PASS: TestAccSecurityLake_serial/Subscriber/customLogs (60.16s)
--- PASS: TestAccSecurityLake_serial/Subscriber/disappears (54.07s)
--- PASS: TestAccSecurityLake_serial/Subscriber/multipleSources (145.40s)
--- PASS: TestAccSecurityLake_serial/Subscriber/tags (72.68s)
--- PASS: TestAccSecurityLake_serial/Subscriber/updated (65.75s)
--- PASS: TestAccSecurityLake_serial/Subscriber/migrateSource (72.73s)
--- PASS: TestAccSecurityLake_serial/Subscriber/accessType (50.48s)

@gdavison gdavison merged commit 3a7abcd into hashicorp:main May 3, 2024
43 checks passed
@github-actions github-actions bot added this to the v5.49.0 milestone May 3, 2024
@github-actions github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label May 10, 2024
Copy link

This functionality has been released in v5.49.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

Copy link

github-actions bot commented Jun 9, 2024

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/securitylake Issues and PRs that pertain to the securitylake service. size/XS Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: aws_securitylake_subscriber supports only one source
4 participants