Skip to content

Commit

Permalink
chore: Delete resource group v1 terraform (#659)
Browse files Browse the repository at this point in the history
* chore: Delete resource group v1 terraform

Signed-off-by: Lei Jin <[email protected]>

* Bump the version to 2.0.0 after delete RGv1

Signed-off-by: Lei Jin <[email protected]>

* Fix the ingration tests

Signed-off-by: Lei Jin <[email protected]>

---------

Signed-off-by: Lei Jin <[email protected]>
  • Loading branch information
leijin-lw authored Oct 22, 2024
1 parent a97134b commit 6341e38
Show file tree
Hide file tree
Showing 36 changed files with 42 additions and 1,971 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.19.3-dev
2.0.0-dev
6 changes: 3 additions & 3 deletions docs/resources/resource_group.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ subcategory: "Resource Groups"
layout: "lacework"
page_title: "Lacework: (beta) lacework_resource_group"
description: |-
Create and manage Resource Groups V2 (Beta)
Create and manage Resource Groups in Lacework
---

# (beta) lacework\_resource\_group

Use this resource to create a V2 Resource Group in order to categorize Lacework-identifiable assets.
For more information, see the [Resource Groups documentation](https://lwdocs-rg2.netlify.app/console/resource-groups/).
Use this resource to create a Resource Group in order to categorize Lacework-identifiable assets.
For more information, see the [Resource Groups documentation](https://docs.fortinet.com/document/lacework-forticnapp/latest/api-reference/690087/using-the-resource-groups-api).


## Example Usage
Expand Down
52 changes: 0 additions & 52 deletions docs/resources/resource_group_account.md

This file was deleted.

42 changes: 0 additions & 42 deletions docs/resources/resource_group_aws.md

This file was deleted.

44 changes: 0 additions & 44 deletions docs/resources/resource_group_azure.md

This file was deleted.

47 changes: 0 additions & 47 deletions docs/resources/resource_group_container.md

This file was deleted.

44 changes: 0 additions & 44 deletions docs/resources/resource_group_gcp.md

This file was deleted.

45 changes: 0 additions & 45 deletions docs/resources/resource_group_machine.md

This file was deleted.

17 changes: 13 additions & 4 deletions examples/resource_lacework_alert_rule/current/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,21 @@ resource "lacework_alert_rule" "example" {
alert_subcategories = var.alert_subcategories
alert_categories = var.alert_categories
alert_sources = var.alert_sources
resource_groups = [lacework_resource_group_aws.example.id]
resource_groups = [lacework_resource_group.example.id]
}

resource "lacework_resource_group_aws" "example" {
resource "lacework_resource_group" "example" {
name = var.resource_group_name
accounts = ["*"]
type = "AWS"
group {
operator = "OR"
filter {
filter_name = "filter1"
field = "Account"
operation = "EQUALS"
value = ["*"]
}
}
}

variable "resource_group_name" {
Expand Down Expand Up @@ -91,5 +100,5 @@ output "alert_sources" {
}

output "resource_group_id" {
value = lacework_resource_group_aws.example.id
value = lacework_resource_group.example.id
}
17 changes: 13 additions & 4 deletions examples/resource_lacework_alert_rule/deprecated/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,21 @@ resource "lacework_alert_rule" "example" {
severities = var.severities
event_categories = var.event_categories
alert_categories = var.alert_categories
resource_groups = [lacework_resource_group_aws.example.id]
resource_groups = [lacework_resource_group.example.id]
}

resource "lacework_resource_group_aws" "example" {
resource "lacework_resource_group" "example" {
name = var.resource_group_name
accounts = ["*"]
type = "AWS"
group {
operator = "OR"
filter {
filter_name = "filter1"
field = "Account"
operation = "EQUALS"
value = ["*"]
}
}
}

variable "resource_group_name" {
Expand Down Expand Up @@ -81,5 +90,5 @@ output "alert_categories" {
}

output "resource_group_id" {
value = lacework_resource_group_aws.example.id
value = lacework_resource_group.example.id
}
15 changes: 12 additions & 3 deletions examples/resource_lacework_report_rule/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,26 @@ resource "lacework_alert_channel_email" "email_alerts" {
test_integration = false
}

resource "lacework_resource_group_aws" "aws_group" {
resource "lacework_resource_group" "aws_group" {
name = var.resource_group_name
accounts = ["*"]
type = "AWS"
group {
operator = "OR"
filter {
filter_name = "filter1"
field = "Account"
operation = "EQUALS"
value = ["*"]
}
}
}

resource "lacework_report_rule" "example" {
name = var.name
description = var.description
enabled = true
severities = var.severities
resource_groups = [lacework_resource_group_aws.aws_group.id]
resource_groups = [lacework_resource_group.aws_group.id]
email_alert_channels = [lacework_alert_channel_email.email_alerts.id]

aws_compliance_reports {
Expand Down
Loading

0 comments on commit 6341e38

Please sign in to comment.