Skip to content

Commit ec49dbf

Browse files
temblekingCopilot
andauthored
docs(posture-control): document resource_kind valid values (#704)
## Summary The `resource_kind` field in `sysdig_secure_posture_control` only showed a single example (`AWS_S3_BUCKET`) with no guidance on valid values for other platforms. This left users — especially on IBM Cloud, GCP, or Azure — guessing what to pass. This adds per-platform examples, the CSPM API endpoint to discover all valid kinds, and links to relevant Sysdig docs. Also fixes a stray `c` in the import example that made it invalid. Closes #684 --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent b21bd24 commit ec49dbf

1 file changed

Lines changed: 17 additions & 2 deletions

File tree

website/docs/r/secure_posture_control.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,22 @@ resource "sysdig_secure_posture_control" "c"{
5252
- `description` - (Required) The description of the Posture Control, eg. `EC2 - Instances should not have a public IP address`
5353
- `rego` - (Required) The Posture control Rego. `package sysdig\ndefault risky = false\nrisky {\n input.NetworkInterfaces[_].Association.PublicIp\n input. NetworkInterfaces[_].Association.PublicIp != \"\"\n}`
5454
- `remediation_details`- (Required) The Posture control Remediation details. `Use a non-default VPC so that your instance is not assigned a public IP address by default`
55-
- `resource_kind` - (Required) The Posture Control Resource kind. It should be a supported resource kind, eg. `AWS_S3_BUCKET`
55+
- `resource_kind` - (Required) The resource type this control evaluates. Must be a supported resource kind string matching
56+
a resource type in the Sysdig CSPM inventory. The format varies by platform:
57+
58+
- **AWS**: `AWS_S3_BUCKET`, `AWS_EC2_INSTANCE`, `AWS_IAM_ROLE`, `AWS_LAMBDA_FUNCTION`, ...
59+
- **GCP**: `GCP_STORAGE_GOOGLEAPIS_COM_BUCKET`, `GCP_COMPUTE_GOOGLEAPIS_COM_INSTANCE`, ...
60+
- **Azure**: `AZURE_MICROSOFT_COMPUTE_VIRTUALMACHINES`, `AZURE_MICROSOFT_STORAGE_STORAGEACCOUNTS`, ...
61+
- **Kubernetes**: `DEPLOYMENT`, `SERVICE`, `NAMESPACE`, `CLUSTERROLE`, ...
62+
- **IBM Cloud**: `IBM_USER-MANAGEMENT_USER`, `IBM_IS_VPC_INSTANCE`, `IBM_CLOUD-OBJECT-STORAGE_BUCKET`, ...
63+
- **Host** (Linux/Windows/Docker): `host`
64+
65+
To list all valid values, query the CSPM API:
66+
```
67+
GET /api/cspm/v1/policy/controls/resource-template/kinds
68+
```
69+
See the [Sysdig API Swagger docs](https://docs.sysdig.com/en/docs/developer-tools/sysdig-api/#swagger-documentation) and
70+
the [posture controls API documentation](https://docs.sysdig.com/en/sysdig-secure/posture_controls/#sysdig-api-endpoint) for more details.
5671
- `severity` - (Required) The Posture Control Severity [`High`, `Medium`, `Low`], case sensitive, e.g., `High`.
5772
## Attributes Reference
5873

@@ -65,5 +80,5 @@ In addition to all arguments above, the following attributes are exported:
6580
Posture custom control can be imported using the ID, e.g.
6681

6782
```
68-
$ terraform import sysdig_secure_posture_control.example c 12345
83+
$ terraform import sysdig_secure_posture_control.example 12345
6984
```

0 commit comments

Comments
 (0)