-
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: Add org account mappings to Agentless for AWS #473
Conversation
f208ce5
to
c39e325
Compare
examples/resource_lacework_integration_aws_org_agentless_scanning/main.tf
Outdated
Show resolved
Hide resolved
937201d
to
cb40e0d
Compare
7f7debc
to
46d407f
Compare
342f7b4
to
ed75185
Compare
2505e90
to
ea3bb24
Compare
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.
Maybe we can reuse most of the code at https://github.com/lacework/terraform-provider-lacework/blob/main/lacework/resource_lacework_integration_aws_ct.go#L318-L385?
lacework/resource_lacework_integration_aws_org_agentless_scanning.go
Outdated
Show resolved
Hide resolved
lacework/resource_lacework_integration_aws_org_agentless_scanning.go
Outdated
Show resolved
Hide resolved
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.
CI failure is NOT related to this change. |
The PR lacework/terraform-provider-lacework#473 introduced a new field named `org_account_mappings` which is only available from version `1.8.0` and above. We made use of this new variable with PR #81 but we forgot to bump the min version, this causes potential issues like #83 where users might be using an older version of the Lacework provider that does not have this new field. The fix is to update the version constraint to `~> 1.8` Note: If you don't know about the pessimistic constraint, please read this doc; https://developer.hashicorp.com/terraform/language/expressions/version-constraints#version-constraint-syntax
The PR lacework/terraform-provider-lacework#473 introduced a new field named `org_account_mappings` which is only available from version `1.8.0` and above. We made use of this new variable with PR #81 but we forgot to bump the min version, this causes potential issues like #83 where users might be using an older version of the Lacework provider that does not have this new field. The fix is to update the version constraint to `~> 1.8` Note: If you don't know about the pessimistic constraint, please read this doc; https://developer.hashicorp.com/terraform/language/expressions/version-constraints#version-constraint-syntax
Issue: (https://lacework.atlassian.net/browse/RAIN-54797)
Description:
This is step #2 to provide LW Org support for Terraform integrations for Agentless. Step 1 having been to update go-sdk: lacework/go-sdk#1251.
Additional Info:
The changes made were essentially to add the account mapping file to the awsOrgAgentlessScanningIntegrationSchema in terraform, add helper functions to get & manipulate the account mapping input from the customer.
Tests:
Added a new integration test specifically for AwsSidekickOrg Integrations as well as updated the example terraform and the response object to get the AwsAgentlessOrgScanningResponse, which is a new function in integration.go that uses the LwOrgClient instead of the LwClient.