Skip to content

Commit 2cbb077

Browse files
committed
add documentation
1 parent a55d033 commit 2cbb077

File tree

1 file changed

+177
-0
lines changed

1 file changed

+177
-0
lines changed

website/docs/r/secure_zone.md

Lines changed: 177 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
---
2+
subcategory: "Sysdig Secure"
3+
layout: "sysdig"
4+
page_title: "Sysdig: sysdig_secure_zone"
5+
description: |-
6+
Creates a Sysdig Secure Zone.
7+
---
8+
9+
# Resource: sysdig_secure_zone
10+
11+
Creates a Sysdig Secure Zone.
12+
13+
-> **Note:** Sysdig Terraform Provider is under rapid development at this point. If you experience any issue or discrepancy while using it, please make sure you have the latest version. If the issue persists, or you have a Feature Request to support an additional set of resources, please open a [new issue](https://github.com/sysdiglabs/terraform-provider-sysdig/issues/new) in the GitHub repository.
14+
15+
## Example Usage
16+
17+
```terraform
18+
resource "sysdig_secure_zone" "example" {
19+
name = "example-zone"
20+
description = "An example Sysdig zone"
21+
22+
scopes {
23+
scope {
24+
target_type = "aws"
25+
rules = "organization in (\"o1\", \"o2\") and account in (\"a1\", \"a2\")"
26+
}
27+
28+
scope {
29+
target_type = "azure"
30+
rules = "organization contains \"o1\""
31+
}
32+
}
33+
}
34+
```
35+
36+
## Argument Reference
37+
38+
- `name` - (Required) The name of the Zone.
39+
- `description` - (Optional) The description of the Zone.
40+
- `scopes` - (Required) Scopes block defines list of scopes attached to Zone.
41+
42+
### Scopes block
43+
44+
- `target_type` - (Required) The target type for the scope. Supported types:
45+
46+
- AWS - `aws`
47+
- GCP - `gcp`
48+
- Azure - `azure`
49+
- Kubernetes - `kubernetes`
50+
- Image - `image`
51+
- Host - `host`
52+
- Git - `git`
53+
54+
- `rules` - (Optional) Query language expression for filtering results. Empty rules means no filtering.
55+
56+
Operators:
57+
58+
- `and`, `or` logical operators
59+
- `in`
60+
- `contains` to check partial values of attributes
61+
62+
List of supported fields by target type:
63+
64+
- `aws`:
65+
- `account`
66+
- Type: string
67+
- Description: AWS account ID
68+
- Example query: `account in ("123456789012")`
69+
- `organization`
70+
- Type: string
71+
- Description: AWS organization ID
72+
- Example query: `organization in ("o-1234567890")`
73+
- `labels`
74+
- Type: string
75+
- Description: AWS account labels
76+
- Example query: `labels in ("label1")`
77+
- `location`
78+
- Type: string
79+
- Description: AWS account location
80+
- Example query: `location in ("us-east-1")`
81+
- `gcp`:
82+
- `account`
83+
- Type: string
84+
- Description: GCP account ID
85+
- Example query: `account in ("123456789012")`
86+
- `organization`
87+
- Type: string
88+
- Description: GCP organization ID
89+
- Example query: `organization in ("1234567890")`
90+
- `labels`
91+
- Type: string
92+
- Description: GCP account labels
93+
- Example query: `labels in ("label1")`
94+
- `location`
95+
- Type: string
96+
- Description: GCP account location
97+
- Example query: `location in ("us-east-1")`
98+
- `azure`:
99+
- `account`
100+
- Type: string
101+
- Description: Azure account ID
102+
- Example query: `account in ("123456789012")`
103+
- `organization`
104+
- Type: string
105+
- Description: Azure organization ID
106+
- Example query: `organization in ("1234567890")`
107+
- `labels`
108+
- Type: string
109+
- Description: Azure account labels
110+
- Example query: `labels in ("label1")`
111+
- `location`
112+
- Type: string
113+
- Description: Azure account location
114+
- Example query: `location in ("us-east-1")`
115+
- `kubernetes`:
116+
- `clusterId`
117+
- Type: string
118+
- Description: Kubernetes cluster ID
119+
- Example query: `clusterId in ("cluster")`
120+
- `namespace`
121+
- Type: string
122+
- Description: Kubernetes namespace
123+
- Example query: `namespace in ("namespace")`
124+
- `labelValues`
125+
- Type: string
126+
- Description: Kubernetes label values
127+
- Example query: `labelValues in ("label1")`
128+
- `distribution`
129+
- Type: string
130+
- Description: Kubernetes distribution
131+
- Example query: `distribution in ("eks")`
132+
- `host`:
133+
- `clusterId`
134+
- Type: string
135+
- Description: Kubernetes cluster ID
136+
- Example query: `clusterId in ("cluster")`
137+
- `name`
138+
- Type: string
139+
- Description: Host name
140+
- Example query: `name in ("host")`
141+
- `image`:
142+
- `registry`
143+
- Type: string
144+
- Description: Image registry
145+
- Example query: `registry in ("registry")`
146+
- `repository`
147+
- Type: string
148+
- Description: Image repository
149+
- Example query: `repository in ("repository")`
150+
- `git`:
151+
- `gitIntegrationId`
152+
- Type: string
153+
- Description: Git integration ID
154+
- Example query: `gitIntegrationId in ("gitIntegrationId")`
155+
- `gitSourceId`
156+
- Type: string
157+
- Description: Git source ID
158+
- Example query: `gitSourceId in ("gitSourceId")`
159+
160+
**Note**: Whenever filtering for values with special characters, the values need to be encoded.
161+
When “ or \ are the special characters, they need to be escaped with \ and then encoded.
162+
163+
## Attributes Reference
164+
165+
In addition to all arguments above, the following attributes are exported:
166+
167+
- `author` - (Computed) The zone author.
168+
- `last_modified_by` - (Computed) By whom is last modification made.
169+
- `last_updated` - (Computed) Timestamp of last modification of zone.
170+
171+
## Import
172+
173+
Zone can be imported using the ID, e.g.
174+
175+
```
176+
$ terraform import sysdig_secure_zone.example 12345
177+
```

0 commit comments

Comments
 (0)