Skip to content

Commit

Permalink
chore(CAD-828): revise documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
aneesh-mysore committed Nov 5, 2024
1 parent 55a08d7 commit a11215c
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 30 deletions.
56 changes: 26 additions & 30 deletions docs/resources/convert_v1_to_v2_resource_groups.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,27 @@
---
subcategory: "Resource Groups"
layout: "lacework"
page_title: "Lacework: convert_to_newer_resource_group"
description: |-
Converts old to new resource groups
---

# convert_to_newer_resource_group
# Convert Original To Newer Resource Groups

The new version of Resource Groups changes the Terraform syntax used to create resource groups.
The old version of Resource Groups defined specific filter fields for each of the Resource Group
The original version of Resource Groups defined specific filter fields for each of the Resource Group
types. The new version defines the `group` argument as an expression tree representing the
relationships between resources.

Refer to [Filterable Fields section]https://docs.fortinet.com/document/lacework-forticnapp/latest/api-reference/690087/using-the-resource-groups-api
Refer to [Filterable Fields section](https://docs.fortinet.com/document/lacework-forticnapp/latest/api-reference/690087/using-the-resource-groups-api
) of the Lacework API documentation for supported resource group filters.

**Note**: The following examples illustrate some common Resource Group types. Additional Resource Group types may apply to your environment and these examples can be used to determine the converted format for those Resource Group types.
**Note**: The following examples illustrate some common Resource Group types and fields. Additional
Resource Group types and filter fields may apply to your environment and these examples along
with the Filterable Fields section document link above can be used to determine the converted format.

# Lacework Account Resource Group
# Lacework Account Resource Groups

There is no new version for Lacework account (organization-level) resource groups. No conversion is applicable.
Organizational level resource groups are deprecated and not supported.

# AWS Resource Groups

## Old Resource Groups
## Original Resource Groups

For AWS, old Resource Groups supported the `accounts` list field, which contained the accounts to be included in the resource group. If any of the accounts in the resource group matched an entry in the list, the resource group would be applied.
For AWS, the original Resource Groups supported the `accounts` list field, which contained the
accounts to be included in the resource group. If any of the accounts in the resource group matched an entry in the list, the resource group would be applied.

### Example

Expand All @@ -40,7 +35,7 @@ resource "lacework_resource_group_aws" "example" {

## New Resource Groups

New Resource Groups supports an expression tree structure in which the `field` field in a filter object is `Account` and the `value` field contains a list of the account IDs.
The new Resource Groups support an expression tree structure in which the `field` field in a filter object is `Account` and the `value` field contains a list of the account IDs.

### Example

Expand All @@ -63,9 +58,11 @@ resource "lacework_resource_group" "example" {

# Azure Resource Groups

## Old Resource Groups
## Original Resource Groups

For Azure, the old Resource Groups supported the `tenant` field, which contained a list of subscriptions to be included in the Resource Group.
For Azure, the original Resource Groups supported the `tenant` field, which
contained a list of subscriptions using the `subscriptions` field to be included in the Resource
Group.

### Example

Expand All @@ -80,7 +77,7 @@ resource "lacework_resource_group_azure" "example" {

## New Resource Groups

The new Resource Groups supports an expression tree structure in which the `field` field in a filter object is defined as either `Tenant ID` or `Subscription ID` and the `value` field contains a list of the tenant or subscrption IDs.
The new Resource Groups support an expression tree structure in which the `field` field in a filter object is defined as either `Tenant ID` or `Subscription ID` and the `value` field contains a list of the tenant or subscrption IDs.

### Example

Expand Down Expand Up @@ -112,9 +109,9 @@ resource "lacework_resource_group_azure" "example" {

# GCP Resource Groups

## Old Resource Groups
## Original Resource Groups

For GCP, the old Resource Groups supported the `projects` field which contained a list of projects to be included in the resource group.
For GCP, the original Resource Groups supported the `projects` field which contained a list of projects to be included in the resource group.

### Example

Expand All @@ -129,7 +126,7 @@ resource "lacework_resource_group_gcp" "example" {

## New Resource Groups

The new Resource Groups supports an expression tree structure in which the `field` field in a filter object is defined as either `Organization ID` or `Project ID` and the `value` field contains a list of the organization or project IDs.
The new Resource Groups support an expression tree structure in which the `field` field in a filter object is defined as either `Organization ID` or `Project ID` and the `value` field contains a list of the organization or project IDs.

### Example

Expand Down Expand Up @@ -158,9 +155,9 @@ resource "lacework_resource_group_gcp" "example" {

# Container Resource Groups

## Old Resource Groups
## Original Resource Groups

For containers, the old Resource Groups supported the `container_tags` and `container_label` fields.
For containers, the original Resource Groups supported the `container_tags` and `container_label` fields.

### Example

Expand All @@ -178,7 +175,7 @@ resource "lacework_resource_group_container" "example" {

## New Resource Groups

The new Resource Groups supports an expression tree structure in which the `field` field in a filter object is defined as either `Image Tag` or `Container Label` and the `value` field contains a list of the image tags or container labels.
The new Resource Groups support an expression tree structure in which the `field` field in a filter object is defined as either `Image Tag` or `Container Label` and the `value` field contains a list of the image tags or container labels.

### Example Representation

Expand Down Expand Up @@ -208,9 +205,9 @@ resource "lacework_resource_group_container" "example" {

# Machine Resource Groups

## Old Resource Groups
## Original Resource Groups

For machines, the old Resource Groups supported the `machine_tags` field.
For machines, the original Resource Groups supported the `machine_tags` field.

### Example

Expand All @@ -226,9 +223,8 @@ resource "lacework_resource_group_machine" "example" {
```

## New Resource Groups
new Resource Groups supports an expression tree structure in which the `field` field in a filter object is defined as either `Image Tag` or `Container Label` and the `value` field contains a list of the image tags or container labels.

The new Resource Groups supports an expression tree structure in which the `field` field in a filter object is defined as `Machine Tag` and the `value` field contains a list of the machine tags.
The new Resource Groups support an expression tree structure in which the `field` field in a filter object is defined as `Machine Tag` and the `value` field contains a list of the machine tags.

### Example

Expand Down
9 changes: 9 additions & 0 deletions docs/resources/resource_group.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ description: |-
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).

## Converting Original to Newer Resource Groups

Please refer to this [documentation](convert_v1_to_v2_resource_groups.md) to understand how to
convert the original resource groups to the newer resource groups.

## Example Usage

Expand Down Expand Up @@ -91,3 +95,8 @@ $ terraform import lacework_resource_group.example EXAMPLE_1234BAE1E42182964D239
-> **Note:** To retrieve the `RESOURCE_GROUP_GUID` from existing resource groups in your account,
use the Lacework CLI command `lacework resource-group list`. To install this tool follow
[this documentation](https://docs.lacework.com/cli/).

## Converting Original to Newer Resource Groups

Please refer to this [documentation](./convert_v1_to_v2_resource_groups.md) to understand how to
convert the original resource groups to the newer resource groups.

0 comments on commit a11215c

Please sign in to comment.