Skip to content

Commit

Permalink
docs: add limit_by_label examples
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 Nov 23, 2022
1 parent 997b861 commit 5e8e12c
Show file tree
Hide file tree
Showing 6 changed files with 108 additions and 22 deletions.
18 changes: 18 additions & 0 deletions website/docs/r/integration_docker_hub.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,24 @@ The `limit_by_label` block can be defined multiple times to define multiple labe
* `key` - (Required) The key of the label.
* `value` - (Required) The value of the label.

For example, to limit by the label `key` with values `value` and `value2`, plus the label `key1` with value `value`.
```hcl
limit_by_label {
key = "key"
value = "value"
}
limit_by_label {
key = "key"
value = "value2"
}
limit_by_label {
key = "key1"
value = "value"
}
```

## Import

A Lacework Docker Hub container registry integration can be imported using a `INT_GUID`, e.g.
Expand Down
18 changes: 18 additions & 0 deletions website/docs/r/integration_docker_v2.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,24 @@ The `limit_by_label` block can be defined multiple times to define multiple labe
* `key` - (Required) The key of the label.
* `value` - (Required) The value of the label.

For example, to limit by the label `key` with values `value` and `value2`, plus the label `key1` with value `value`.
```hcl
limit_by_label {
key = "key"
value = "value"
}
limit_by_label {
key = "key"
value = "value2"
}
limit_by_label {
key = "key1"
value = "value"
}
```

## Import

A Lacework Docker V2 container registry integration can be imported using a `INT_GUID`, e.g.
Expand Down
18 changes: 18 additions & 0 deletions website/docs/r/integration_ecr.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,24 @@ The `limit_by_label` block can be defined multiple times to define multiple labe
* `key` - (Required) The key of the label.
* `value` - (Required) The value of the label.

For example, to limit by the label `key` with values `value` and `value2`, plus the label `key1` with value `value`.
```hcl
limit_by_label {
key = "key"
value = "value"
}
limit_by_label {
key = "key"
value = "value2"
}
limit_by_label {
key = "key1"
value = "value"
}
```

### Credentials

`credentials` supports the combination of the following arguments.
Expand Down
40 changes: 18 additions & 22 deletions website/docs/r/integration_gar.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -43,28 +43,6 @@ module "gar" {

To see the list of inputs, outputs and dependencies, visit the [Terraform registry page of this module](https://registry.terraform.io/modules/lacework/gar/gcp/latest).

## Example Loading Credentials from Local File

Alternatively, this example shows how to load a [service account key created](https://cloud.google.com/iam/docs/creating-managing-service-account-keys#creating_service_account_keys)
using the Cloud Console or the `gcloud` command-line tool located on a local file on disk:

```hcl
locals {
gar_credentials = jsondecode(file("/path/to/creds.json"))
}
resource "lacework_integration_gar" "example" {
name = "GAR Example"
registry_domain = "us-west1-docker.pkg.dev"
credentials {
client_id = local.gar.client_id
client_email = local.gar.client_email
private_key_id = local.gar.private_key_id
private_key = local.gar.private_key
}
}
```

## Example Using Limits

```hcl
Expand Down Expand Up @@ -117,6 +95,24 @@ The `limit_by_label` block can be defined multiple times to define multiple labe
* `key` - (Required) The key of the label.
* `value` - (Required) The value of the label.

For example, to limit by the label `key` with values `value` and `value2`, plus the label `key1` with value `value`.
```hcl
limit_by_label {
key = "key"
value = "value"
}
limit_by_label {
key = "key"
value = "value2"
}
limit_by_label {
key = "key1"
value = "value"
}
```

### Credentials

`credentials` supports the following arguments:
Expand Down
18 changes: 18 additions & 0 deletions website/docs/r/integration_gcr.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,24 @@ The `limit_by_label` block can be defined multiple times to define multiple labe
* `key` - (Required) The key of the label.
* `value` - (Required) The value of the label.

For example, to limit by the label `key` with values `value` and `value2`, plus the label `key1` with value `value`.
```hcl
limit_by_label {
key = "key"
value = "value"
}
limit_by_label {
key = "key"
value = "value2"
}
limit_by_label {
key = "key1"
value = "value"
}
```

### Credentials

`credentials` supports the following arguments:
Expand Down
18 changes: 18 additions & 0 deletions website/docs/r/integration_ghcr.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,24 @@ The `limit_by_label` block can be defined multiple times to define multiple labe
* `key` - (Required) The key of the label.
* `value` - (Required) The value of the label.

For example, to limit by the label `key` with values `value` and `value2`, plus the label `key1` with value `value`.
```hcl
limit_by_label {
key = "key"
value = "value"
}
limit_by_label {
key = "key"
value = "value2"
}
limit_by_label {
key = "key1"
value = "value"
}
```

## Import

A Lacework Github container registry integration can be imported using a `INT_GUID`, e.g.
Expand Down

0 comments on commit 5e8e12c

Please sign in to comment.