@@ -70,17 +70,13 @@ To provision new infrastructures and enable Chaos Engineering in a single workfl
70
70
71
71
``` hcl
72
72
resource "harness_chaos_infrastructure_v2" "this" {
73
- depends_on = [
74
- harness_platform_infrastructure.this
75
- ]
76
-
77
73
// Required fields
78
- org_id = local.org_id
79
- project_id = local.project_id
80
- environment_id = harness_platform_environment.this.id
81
- infra_id = harness_platform_infrastructure.this.id
82
- name = var.chaos_infra_name
83
- description = var.chaos_infra_description
74
+ org_id = "your_org_id"
75
+ project_id = "your_project_id"
76
+ environment_id = "your_environment_id"
77
+ infra_id = "your_infrastructure_id"
78
+ name = "chaos-infra"
79
+ description = "Chaos Engineering Infrastructure"
84
80
}
85
81
```
86
82
@@ -93,20 +89,17 @@ Configure service discovery to automatically detect services for chaos experimen
93
89
94
90
``` hcl
95
91
resource "harness_service_discovery_agent" "this" {
96
- depends_on = [
97
- harness_chaos_infrastructure_v2.this
98
- ]
99
-
100
- name = var.service_discovery_agent_name
101
- org_identifier = local.org_id
102
- project_identifier = local.project_id
103
- environment_identifier = harness_platform_environment.this.id
104
- infra_identifier = harness_platform_infrastructure.this.id
105
- installation_type = var.sd_installation_type
92
+ // Required fields
93
+ name = "service-discovery-agent"
94
+ org_identifier = "your_org_id"
95
+ project_identifier = "your_project_id"
96
+ environment_identifier = "your_environment_id"
97
+ infra_identifier = "your_infrastructure_id"
98
+ installation_type = "kubernetes"
106
99
107
100
config {
108
101
kubernetes {
109
- namespace = var.sd_namespace
102
+ namespace = "harness-delegate-ng"
110
103
}
111
104
}
112
105
}
@@ -122,11 +115,11 @@ Configure custom image registries for chaos experiments.
122
115
``` hcl
123
116
resource "harness_chaos_image_registry" "project_level" {
124
117
// Required fields
125
- org_id = local.org_id
126
- project_id = local.project_id
118
+ org_id = "your_org_id"
119
+ project_id = "your_project_id"
127
120
128
- registry_server = var.registry_server
129
- registry_account = var.registry_account
121
+ registry_server = "docker.io"
122
+ registry_account = "your_registry_account"
130
123
}
131
124
```
132
125
@@ -141,21 +134,18 @@ Define security governance rules and conditions for chaos experiments to ensure
141
134
``` hcl
142
135
resource "harness_chaos_security_governance_condition" "this" {
143
136
// Required fields
144
- name = var.security_governance_condition_name
137
+ name = "block-destructive-faults"
145
138
description = "Condition to block destructive experiments"
146
- org_id = local.org_id
147
- project_id = local.project_id
148
- infra_type = var.security_governance_condition_infra_type
139
+ org_id = "your_org_id"
140
+ project_id = "your_project_id"
141
+ infra_type = "kubernetes"
149
142
150
143
fault_spec {
151
- operator = var.security_governance_condition_operator
144
+ operator = "EQUAL"
152
145
153
- dynamic "faults" {
154
- for_each = var.security_governance_condition_faults
155
- content {
156
- fault_type = faults.value.fault_type
157
- name = faults.value.name
158
- }
146
+ faults {
147
+ fault_type = "pod-delete"
148
+ name = "pod-delete"
159
149
}
160
150
}
161
151
}
@@ -168,12 +158,12 @@ resource "harness_chaos_security_governance_condition" "this" {
168
158
``` hcl
169
159
resource "harness_chaos_security_governance_rule" "this" {
170
160
// Required fields
171
- name = var.security_governance_rule_name
172
- description = var.security_governance_rule_description
173
- org_id = local.org_id
174
- project_id = local.project_id
161
+ name = "production-safety-rule"
162
+ description = "Block destructive experiments in production"
163
+ org_id = "your_org_id"
164
+ project_id = "your_project_id"
175
165
condition_ids = [harness_chaos_security_governance_condition.this.id]
176
- user_group_ids = var.security_governance_rule_user_group_ids
166
+ user_group_ids = ["your_user_group_id"]
177
167
}
178
168
```
179
169
@@ -188,14 +178,14 @@ Manage custom ChaosHubs to provide organization, account or project level fault,
188
178
``` hcl
189
179
resource "harness_chaos_hub" "this" {
190
180
// Required fields
191
- org_id = local.org_id
192
- project_id = local.project_id
193
- name = var.chaos_hub_name
194
- description = var.chaos_hub_description
195
-
196
- connector_id = var.chaos_hub_connector_id
197
- repo_branch = var.chaos_hub_repo_branch
198
- repo_name = var.chaos_hub_repo_name
181
+ org_id = "your_org_id"
182
+ project_id = "your_project_id"
183
+ name = "custom-chaos-hub"
184
+ description = "Custom ChaosHub for organization experiments"
185
+
186
+ connector_id = "your_git_connector_id"
187
+ repo_branch = "main"
188
+ repo_name = "chaos-experiments"
199
189
}
200
190
```
201
191
0 commit comments