Skip to content

Commit

Permalink
chore(lwgenerate): pin TF modules with force_destroy enabled
Browse files Browse the repository at this point in the history
Signed-off-by: Salim Afiune Maya <afiune@lacework.net>
  • Loading branch information
afiune committed Jun 27, 2023
1 parent cb77633 commit aafcf3a
Show file tree
Hide file tree
Showing 21 changed files with 69 additions and 69 deletions.
22 changes: 11 additions & 11 deletions lwgenerate/aws/aws_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ var laceworkProvider = `provider "lacework" {

var moduleImportCtWithConfig = `module "main_cloudtrail" {
source = "lacework/cloudtrail/aws"
version = "~> 2.0"
version = "~> 2.7"
iam_role_arn = module.aws_config.iam_role_arn
iam_role_external_id = module.aws_config.external_id
iam_role_name = module.aws_config.iam_role_name
Expand All @@ -352,52 +352,52 @@ var moduleImportCtWithConfig = `module "main_cloudtrail" {

var moduleImportCtWithSnsWithoutConfig = `module "main_cloudtrail" {
source = "lacework/cloudtrail/aws"
version = "~> 2.0"
version = "~> 2.7"
sns_topic_encryption_key_arn = "arn:aws:kms:us-west-2:249446771485:key/2537e820-be82-4ded-8dca-504e199b0903"
sns_topic_name = "sns-topic-name"
}
`

var moduleImportCtWithSnsNoConfigNoEncryption = `module "main_cloudtrail" {
source = "lacework/cloudtrail/aws"
version = "~> 2.0"
version = "~> 2.7"
sns_topic_encryption_enabled = false
sns_topic_name = "sns-topic-name"
}
`
var moduleImportCtWithSnsNoConfigEncryptionNotSet = `module "main_cloudtrail" {
source = "lacework/cloudtrail/aws"
version = "~> 2.0"
version = "~> 2.7"
sns_topic_name = "sns-topic-name"
}
`

var moduleImportCtWithSqsWithoutConfig = `module "main_cloudtrail" {
source = "lacework/cloudtrail/aws"
version = "~> 2.0"
version = "~> 2.7"
sqs_encryption_key_arn = "arn:aws:kms:us-west-2:249446771485:key/2537e820-be82-4ded-8dca-504e199b0903"
sqs_queue_name = "sqs-queue-name"
}
`

var moduleImportCtWithSqsNoConfigNoEncryption = `module "main_cloudtrail" {
source = "lacework/cloudtrail/aws"
version = "~> 2.0"
version = "~> 2.7"
sqs_encryption_enabled = false
sqs_queue_name = "sqs-queue-name"
}
`

var moduleImportCtWithSqsNoConfigEncryptionNotSet = `module "main_cloudtrail" {
source = "lacework/cloudtrail/aws"
version = "~> 2.0"
version = "~> 2.7"
sqs_queue_name = "sqs-queue-name"
}
`

var moduleImportCtWithAllEncryptionSet = `module "main_cloudtrail" {
source = "lacework/cloudtrail/aws"
version = "~> 2.0"
version = "~> 2.7"
bucket_name = "s3-bucket-name"
bucket_sse_key_arn = "arn:aws:kms:us-west-2:249446771485:key/2537e820-be82-4ded-8dca-504e199b0903"
cloudtrail_name = "cloudtrail-name"
Expand All @@ -410,7 +410,7 @@ var moduleImportCtWithAllEncryptionSet = `module "main_cloudtrail" {

var moduleImportCtWithoutConfig = `module "main_cloudtrail" {
source = "lacework/cloudtrail/aws"
version = "~> 2.0"
version = "~> 2.7"
}
`

Expand All @@ -429,7 +429,7 @@ var moduleImportConfigWithLaceworkAccountID = `module "aws_config" {

var moduleImportCtWithLaceworkAccountID = `module "main_cloudtrail" {
source = "lacework/cloudtrail/aws"
version = "~> 2.0"
version = "~> 2.7"
iam_role_arn = module.aws_config.iam_role_arn
iam_role_external_id = module.aws_config.external_id
iam_role_name = module.aws_config.iam_role_name
Expand All @@ -440,7 +440,7 @@ var moduleImportCtWithLaceworkAccountID = `module "main_cloudtrail" {

var moduleImportCtWithS3BucketNotification = `module "main_cloudtrail" {
source = "lacework/cloudtrail/aws"
version = "~> 2.0"
version = "~> 2.7"
use_s3_bucket_notification = true
}
`
6 changes: 3 additions & 3 deletions lwgenerate/aws_eks_audit/aws_eks_audit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ var moduleSingleRegionBasic = `provider "aws" {
module "aws_eks_audit_log" {
source = "lacework/eks-audit-log/aws"
version = "~> 0.4"
version = "~> 1.0"
cloudwatch_regions = ["us-east-1"]
cluster_names = ["cluster1", "cluster2"]
kms_key_multi_region = false
Expand All @@ -426,7 +426,7 @@ var moduleSingleRegionWithLaceworkAccountID = `provider "aws" {
module "aws_eks_audit_log" {
source = "lacework/eks-audit-log/aws"
version = "~> 0.4"
version = "~> 1.0"
cloudwatch_regions = ["us-east-1"]
cluster_names = ["cluster1", "cluster2"]
kms_key_multi_region = false
Expand Down Expand Up @@ -471,7 +471,7 @@ resource "aws_cloudwatch_log_subscription_filter" "lw_cw_subscription_filter_us-
module "aws_eks_audit_log" {
source = "lacework/eks-audit-log/aws"
version = "~> 0.4"
version = "~> 1.0"
cloudwatch_regions = ["us-east-1", "us-east-2"]
no_cw_subscription_filter = true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module "az_ad_application" {

module "az_activity_log" {
source = "lacework/activity-log/azure"
version = "~> 2.0"
version = "~> 2.7"
all_subscriptions = true
application_id = module.az_ad_application.application_id
application_password = module.az_ad_application.application_password
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module "az_ad_application" {

module "az_activity_log" {
source = "lacework/activity-log/azure"
version = "~> 2.0"
version = "~> 2.7"
application_id = module.az_ad_application.application_id
application_password = module.az_ad_application.application_password
service_principal_id = module.az_ad_application.service_principal_id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module "az_ad_application" {

module "az_activity_log" {
source = "lacework/activity-log/azure"
version = "~> 2.0"
version = "~> 2.7"
application_id = module.az_ad_application.application_id
application_password = module.az_ad_application.application_password
service_principal_id = module.az_ad_application.service_principal_id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module "az_ad_application" {

module "az_activity_log" {
source = "lacework/activity-log/azure"
version = "~> 2.0"
version = "~> 2.7"
application_id = module.az_ad_application.application_id
application_password = module.az_ad_application.application_password
service_principal_id = module.az_ad_application.service_principal_id
Expand Down
2 changes: 1 addition & 1 deletion lwgenerate/azure/test-data/activity-log-with-location.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module "az_ad_application" {

module "az_activity_log" {
source = "lacework/activity-log/azure"
version = "~> 2.0"
version = "~> 2.7"
application_id = module.az_ad_application.application_id
application_password = module.az_ad_application.application_password
location = "West US 2"
Expand Down
4 changes: 2 additions & 2 deletions lwgenerate/azure/test-data/activity_log_with_config.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module "az_ad_application" {

module "az_config" {
source = "lacework/config/azure"
version = "~> 2.0"
version = "~> 2.7"
application_id = module.az_ad_application.application_id
application_password = module.az_ad_application.application_password
service_principal_id = module.az_ad_application.service_principal_id
Expand All @@ -31,7 +31,7 @@ module "az_config" {

module "az_activity_log" {
source = "lacework/activity-log/azure"
version = "~> 2.0"
version = "~> 2.7"
application_id = module.az_ad_application.application_id
application_password = module.az_ad_application.application_password
service_principal_id = module.az_ad_application.service_principal_id
Expand Down
2 changes: 1 addition & 1 deletion lwgenerate/azure/test-data/activity_log_without_config.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module "az_ad_application" {

module "az_activity_log" {
source = "lacework/activity-log/azure"
version = "~> 2.0"
version = "~> 2.7"
application_id = module.az_ad_application.application_id
application_password = module.az_ad_application.application_password
service_principal_id = module.az_ad_application.service_principal_id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module "az_ad_application" {

module "az_config" {
source = "lacework/config/azure"
version = "~> 2.0"
version = "~> 2.7"
application_id = module.az_ad_application.application_id
application_password = module.az_ad_application.application_password
service_principal_id = module.az_ad_application.service_principal_id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module "az_ad_application" {

module "az_config" {
source = "lacework/config/azure"
version = "~> 2.0"
version = "~> 2.7"
all_subscriptions = true
application_id = module.az_ad_application.application_id
application_password = module.az_ad_application.application_password
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module "az_ad_application" {

module "az_config" {
source = "lacework/config/azure"
version = "~> 2.0"
version = "~> 2.7"
application_id = module.az_ad_application.application_id
application_password = module.az_ad_application.application_password
service_principal_id = module.az_ad_application.service_principal_id
Expand Down
2 changes: 1 addition & 1 deletion lwgenerate/azure/test-data/config-with-management-group.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module "az_ad_application" {

module "az_config" {
source = "lacework/config/azure"
version = "~> 2.0"
version = "~> 2.7"
application_id = module.az_ad_application.application_id
application_password = module.az_ad_application.application_password
management_group_id = "test-management-group-1"
Expand Down
2 changes: 1 addition & 1 deletion lwgenerate/azure/test-data/config-with-storage-account.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module "az_ad_application" {

module "az_config" {
source = "lacework/config/azure"
version = "~> 2.0"
version = "~> 2.7"
application_id = module.az_ad_application.application_id
application_password = module.az_ad_application.application_password
service_principal_id = module.az_ad_application.service_principal_id
Expand Down
2 changes: 1 addition & 1 deletion lwgenerate/azure/test-data/config_without_activity_log.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module "az_ad_application" {

module "az_config" {
source = "lacework/config/azure"
version = "~> 2.0"
version = "~> 2.7"
application_id = module.az_ad_application.application_id
application_password = module.az_ad_application.application_password
service_principal_id = module.az_ad_application.service_principal_id
Expand Down
4 changes: 2 additions & 2 deletions lwgenerate/azure/test-data/customer-ad-details.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ provider "azurerm" {

module "az_config" {
source = "lacework/config/azure"
version = "~> 2.0"
version = "~> 2.7"
application_id = "AD-Test-Application-ID"
application_password = "AD-Test-Password"
lacework_integration_name = "Test Config Rename"
Expand All @@ -27,7 +27,7 @@ module "az_config" {

module "az_activity_log" {
source = "lacework/activity-log/azure"
version = "~> 2.0"
version = "~> 2.7"
application_id = "AD-Test-Application-ID"
application_password = "AD-Test-Password"
lacework_integration_name = "Test Activity Log Rename"
Expand Down
2 changes: 1 addition & 1 deletion lwgenerate/azure/test-data/renamed_activity_log.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module "az_ad_application" {

module "az_activity_log" {
source = "lacework/activity-log/azure"
version = "~> 2.0"
version = "~> 2.7"
application_id = module.az_ad_application.application_id
application_password = module.az_ad_application.application_password
lacework_integration_name = "Test Activity Log Rename"
Expand Down
2 changes: 1 addition & 1 deletion lwgenerate/azure/test-data/renamed_config.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module "az_ad_application" {

module "az_config" {
source = "lacework/config/azure"
version = "~> 2.0"
version = "~> 2.7"
application_id = module.az_ad_application.application_id
application_password = module.az_ad_application.application_password
lacework_integration_name = "Test Config Rename"
Expand Down
4 changes: 2 additions & 2 deletions lwgenerate/azure/test-data/renamed_config_and_activity_log.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module "az_ad_application" {

module "az_config" {
source = "lacework/config/azure"
version = "~> 2.0"
version = "~> 2.7"
application_id = module.az_ad_application.application_id
application_password = module.az_ad_application.application_password
lacework_integration_name = "Test Config Rename"
Expand All @@ -32,7 +32,7 @@ module "az_config" {

module "az_activity_log" {
source = "lacework/activity-log/azure"
version = "~> 2.0"
version = "~> 2.7"
application_id = module.az_ad_application.application_id
application_password = module.az_ad_application.application_password
lacework_integration_name = "Test Activity Log Rename"
Expand Down
10 changes: 5 additions & 5 deletions lwgenerate/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@ const (
AwsConfigSource = "lacework/config/aws"
AwsConfigVersion = "~> 0.5"
AwsCloudTrailSource = "lacework/cloudtrail/aws"
AwsCloudTrailVersion = "~> 2.0"
AwsCloudTrailVersion = "~> 2.7"
AwsEksAuditSource = "lacework/eks-audit-log/aws"
AwsEksAuditVersion = "~> 0.4"
AwsEksAuditVersion = "~> 1.0"

LWAzureConfigSource = "lacework/config/azure"
LWAzureConfigVersion = "~> 2.0"
LWAzureConfigVersion = "~> 2.7"
LWAzureActivityLogSource = "lacework/activity-log/azure"
LWAzureActivityLogVersion = "~> 2.0"
LWAzureActivityLogVersion = "~> 2.7"
LWAzureADSource = "lacework/ad-application/azure"
LWAzureADVersion = "~> 1.0"

GcpConfigSource = "lacework/config/gcp"
GcpConfigVersion = "~> 2.3"
GcpAuditLogSource = "lacework/audit-log/gcp"
GcpAuditLogVersion = "~> 3.0"
GcpAuditLogVersion = "~> 3.4"
GcpGKEAuditLogSource = "lacework/gke-audit-log/gcp"
GcpGKEAuditLogVersion = "~> 0.3"
GcpPubSubAuditLog = "lacework/pub-sub-audit-log/gcp"
Expand Down
Loading

0 comments on commit aafcf3a

Please sign in to comment.