qontract-reconcile 0.10.2.dev504__py3-none-any.whl → 0.10.2.dev505__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. {qontract_reconcile-0.10.2.dev504.dist-info → qontract_reconcile-0.10.2.dev505.dist-info}/METADATA +1 -4
  2. {qontract_reconcile-0.10.2.dev504.dist-info → qontract_reconcile-0.10.2.dev505.dist-info}/RECORD +10 -28
  3. reconcile/cli.py +0 -108
  4. reconcile/gql_definitions/integrations/integrations.py +1 -31
  5. reconcile/integrations_manager.py +0 -2
  6. reconcile/utils/external_resource_spec.py +1 -2
  7. reconcile/utils/runtime/sharding.py +0 -80
  8. tools/cli_commands/systems_and_tools.py +0 -23
  9. reconcile/gql_definitions/terraform_cloudflare_dns/__init__.py +0 -0
  10. reconcile/gql_definitions/terraform_cloudflare_dns/app_interface_cloudflare_dns_settings.py +0 -62
  11. reconcile/gql_definitions/terraform_cloudflare_dns/terraform_cloudflare_zones.py +0 -193
  12. reconcile/gql_definitions/terraform_cloudflare_resources/__init__.py +0 -0
  13. reconcile/gql_definitions/terraform_cloudflare_resources/terraform_cloudflare_accounts.py +0 -127
  14. reconcile/gql_definitions/terraform_cloudflare_resources/terraform_cloudflare_resources.py +0 -359
  15. reconcile/gql_definitions/terraform_cloudflare_users/__init__.py +0 -0
  16. reconcile/gql_definitions/terraform_cloudflare_users/app_interface_setting_cloudflare_and_vault.py +0 -62
  17. reconcile/gql_definitions/terraform_cloudflare_users/terraform_cloudflare_roles.py +0 -139
  18. reconcile/terraform_cloudflare_dns.py +0 -379
  19. reconcile/terraform_cloudflare_resources.py +0 -445
  20. reconcile/terraform_cloudflare_users.py +0 -374
  21. reconcile/typed_queries/cloudflare.py +0 -10
  22. reconcile/utils/terrascript/__init__.py +0 -0
  23. reconcile/utils/terrascript/cloudflare_client.py +0 -310
  24. reconcile/utils/terrascript/cloudflare_resources.py +0 -432
  25. reconcile/utils/terrascript/models.py +0 -26
  26. reconcile/utils/terrascript/resources.py +0 -43
  27. {qontract_reconcile-0.10.2.dev504.dist-info → qontract_reconcile-0.10.2.dev505.dist-info}/WHEEL +0 -0
  28. {qontract_reconcile-0.10.2.dev504.dist-info → qontract_reconcile-0.10.2.dev505.dist-info}/entry_points.txt +0 -0
@@ -1,193 +0,0 @@
1
- """
2
- Generated by qenerate plugin=pydantic_v2. DO NOT MODIFY MANUALLY!
3
- """
4
- from collections.abc import Callable # noqa: F401 # pylint: disable=W0611
5
- from datetime import datetime # noqa: F401 # pylint: disable=W0611
6
- from enum import Enum # noqa: F401 # pylint: disable=W0611
7
- from typing import ( # noqa: F401 # pylint: disable=W0611
8
- Any,
9
- Optional,
10
- Union,
11
- )
12
-
13
- from pydantic import ( # noqa: F401 # pylint: disable=W0611
14
- BaseModel,
15
- ConfigDict,
16
- Field,
17
- Json,
18
- )
19
-
20
- from reconcile.gql_definitions.fragments.vault_secret import VaultSecret
21
-
22
-
23
- DEFINITION = """
24
- fragment VaultSecret on VaultSecret_v1 {
25
- path
26
- field
27
- version
28
- format
29
- }
30
-
31
- query CloudflareDnsZone {
32
- zones: cloudflare_dns_zone_v1 {
33
- identifier
34
- zone
35
- account {
36
- name
37
- type
38
- description
39
- providerVersion
40
- enforceTwofactor
41
- apiCredentials {
42
- ...VaultSecret
43
- }
44
- terraformStateAccount {
45
- name
46
- consoleUrl
47
- terraformUsername
48
- automationToken {
49
- ...VaultSecret
50
- }
51
- terraformState {
52
- provider
53
- bucket
54
- region
55
- integrations {
56
- integration
57
- key
58
- }
59
- }
60
- }
61
- deletionApprovals {
62
- expiration
63
- name
64
- type
65
- }
66
- }
67
- records {
68
- identifier
69
- name
70
- type
71
- ttl
72
- value
73
- priority
74
- proxied
75
- data {
76
- algorithm
77
- protocol
78
- public_key
79
- digest_type
80
- digest
81
- key_tag
82
- flags
83
- tag
84
- value
85
- }
86
- }
87
- type
88
- plan
89
- max_records
90
- delete
91
- }
92
- }
93
- """
94
-
95
-
96
- class ConfiguredBaseModel(BaseModel):
97
- model_config = ConfigDict(
98
- extra='forbid'
99
- )
100
-
101
-
102
- class AWSTerraformStateIntegrationsV1(ConfiguredBaseModel):
103
- integration: str = Field(..., alias="integration")
104
- key: str = Field(..., alias="key")
105
-
106
-
107
- class TerraformStateAWSV1(ConfiguredBaseModel):
108
- provider: str = Field(..., alias="provider")
109
- bucket: str = Field(..., alias="bucket")
110
- region: str = Field(..., alias="region")
111
- integrations: list[AWSTerraformStateIntegrationsV1] = Field(..., alias="integrations")
112
-
113
-
114
- class AWSAccountV1(ConfiguredBaseModel):
115
- name: str = Field(..., alias="name")
116
- console_url: str = Field(..., alias="consoleUrl")
117
- terraform_username: Optional[str] = Field(..., alias="terraformUsername")
118
- automation_token: VaultSecret = Field(..., alias="automationToken")
119
- terraform_state: Optional[TerraformStateAWSV1] = Field(..., alias="terraformState")
120
-
121
-
122
- class DeletionApprovalV1(ConfiguredBaseModel):
123
- expiration: str = Field(..., alias="expiration")
124
- name: str = Field(..., alias="name")
125
- q_type: str = Field(..., alias="type")
126
-
127
-
128
- class CloudflareAccountV1(ConfiguredBaseModel):
129
- name: str = Field(..., alias="name")
130
- q_type: Optional[str] = Field(..., alias="type")
131
- description: Optional[str] = Field(..., alias="description")
132
- provider_version: str = Field(..., alias="providerVersion")
133
- enforce_twofactor: Optional[bool] = Field(..., alias="enforceTwofactor")
134
- api_credentials: VaultSecret = Field(..., alias="apiCredentials")
135
- terraform_state_account: AWSAccountV1 = Field(..., alias="terraformStateAccount")
136
- deletion_approvals: Optional[list[DeletionApprovalV1]] = Field(..., alias="deletionApprovals")
137
-
138
-
139
- class CloudflareDnsRecordDataSettingsV1(ConfiguredBaseModel):
140
- algorithm: Optional[int] = Field(..., alias="algorithm")
141
- protocol: Optional[int] = Field(..., alias="protocol")
142
- public_key: Optional[str] = Field(..., alias="public_key")
143
- digest_type: Optional[int] = Field(..., alias="digest_type")
144
- digest: Optional[str] = Field(..., alias="digest")
145
- key_tag: Optional[int] = Field(..., alias="key_tag")
146
- flags: Optional[int] = Field(..., alias="flags")
147
- tag: Optional[str] = Field(..., alias="tag")
148
- value: Optional[str] = Field(..., alias="value")
149
-
150
-
151
- class CloudflareDnsRecordV1(ConfiguredBaseModel):
152
- identifier: str = Field(..., alias="identifier")
153
- name: str = Field(..., alias="name")
154
- q_type: str = Field(..., alias="type")
155
- ttl: int = Field(..., alias="ttl")
156
- value: Optional[str] = Field(..., alias="value")
157
- priority: Optional[int] = Field(..., alias="priority")
158
- proxied: Optional[bool] = Field(..., alias="proxied")
159
- data: Optional[CloudflareDnsRecordDataSettingsV1] = Field(..., alias="data")
160
-
161
-
162
- class CloudflareDnsZoneV1(ConfiguredBaseModel):
163
- identifier: str = Field(..., alias="identifier")
164
- zone: str = Field(..., alias="zone")
165
- account: CloudflareAccountV1 = Field(..., alias="account")
166
- records: Optional[list[CloudflareDnsRecordV1]] = Field(..., alias="records")
167
- q_type: Optional[str] = Field(..., alias="type")
168
- plan: Optional[str] = Field(..., alias="plan")
169
- max_records: Optional[int] = Field(..., alias="max_records")
170
- delete: Optional[bool] = Field(..., alias="delete")
171
-
172
-
173
- class CloudflareDnsZoneQueryData(ConfiguredBaseModel):
174
- zones: Optional[list[CloudflareDnsZoneV1]] = Field(..., alias="zones")
175
-
176
-
177
- def query(query_func: Callable, **kwargs: Any) -> CloudflareDnsZoneQueryData:
178
- """
179
- This is a convenience function which queries and parses the data into
180
- concrete types. It should be compatible with most GQL clients.
181
- You do not have to use it to consume the generated data classes.
182
- Alternatively, you can also mime and alternate the behavior
183
- of this function in the caller.
184
-
185
- Parameters:
186
- query_func (Callable): Function which queries your GQL Server
187
- kwargs: optional arguments that will be passed to the query function
188
-
189
- Returns:
190
- CloudflareDnsZoneQueryData: queried data parsed into generated classes
191
- """
192
- raw_data: dict[Any, Any] = query_func(DEFINITION, **kwargs)
193
- return CloudflareDnsZoneQueryData(**raw_data)
@@ -1,127 +0,0 @@
1
- """
2
- Generated by qenerate plugin=pydantic_v2. DO NOT MODIFY MANUALLY!
3
- """
4
- from collections.abc import Callable # noqa: F401 # pylint: disable=W0611
5
- from datetime import datetime # noqa: F401 # pylint: disable=W0611
6
- from enum import Enum # noqa: F401 # pylint: disable=W0611
7
- from typing import ( # noqa: F401 # pylint: disable=W0611
8
- Any,
9
- Optional,
10
- Union,
11
- )
12
-
13
- from pydantic import ( # noqa: F401 # pylint: disable=W0611
14
- BaseModel,
15
- ConfigDict,
16
- Field,
17
- Json,
18
- )
19
-
20
- from reconcile.gql_definitions.fragments.vault_secret import VaultSecret
21
-
22
-
23
- DEFINITION = """
24
- fragment VaultSecret on VaultSecret_v1 {
25
- path
26
- field
27
- version
28
- format
29
- }
30
-
31
- query TerraformCloudflareAccounts {
32
- accounts: cloudflare_accounts_v1 {
33
- name
34
- description
35
- providerVersion
36
- apiCredentials {
37
- ...VaultSecret
38
- }
39
- terraformStateAccount {
40
- name
41
- automationToken {
42
- ...VaultSecret
43
- }
44
- terraformState {
45
- provider
46
- bucket
47
- region
48
- integrations {
49
- integration
50
- key
51
- }
52
- }
53
- }
54
- deletionApprovals {
55
- expiration
56
- name
57
- type
58
- }
59
- enforceTwofactor
60
- type
61
- }
62
- }
63
- """
64
-
65
-
66
- class ConfiguredBaseModel(BaseModel):
67
- model_config = ConfigDict(
68
- extra='forbid'
69
- )
70
-
71
-
72
- class AWSTerraformStateIntegrationsV1(ConfiguredBaseModel):
73
- integration: str = Field(..., alias="integration")
74
- key: str = Field(..., alias="key")
75
-
76
-
77
- class TerraformStateAWSV1(ConfiguredBaseModel):
78
- provider: str = Field(..., alias="provider")
79
- bucket: str = Field(..., alias="bucket")
80
- region: str = Field(..., alias="region")
81
- integrations: list[AWSTerraformStateIntegrationsV1] = Field(..., alias="integrations")
82
-
83
-
84
- class AWSAccountV1(ConfiguredBaseModel):
85
- name: str = Field(..., alias="name")
86
- automation_token: VaultSecret = Field(..., alias="automationToken")
87
- terraform_state: Optional[TerraformStateAWSV1] = Field(..., alias="terraformState")
88
-
89
-
90
- class DeletionApprovalV1(ConfiguredBaseModel):
91
- expiration: str = Field(..., alias="expiration")
92
- name: str = Field(..., alias="name")
93
- q_type: str = Field(..., alias="type")
94
-
95
-
96
- class CloudflareAccountV1(ConfiguredBaseModel):
97
- name: str = Field(..., alias="name")
98
- description: Optional[str] = Field(..., alias="description")
99
- provider_version: str = Field(..., alias="providerVersion")
100
- api_credentials: VaultSecret = Field(..., alias="apiCredentials")
101
- terraform_state_account: AWSAccountV1 = Field(..., alias="terraformStateAccount")
102
- deletion_approvals: Optional[list[DeletionApprovalV1]] = Field(..., alias="deletionApprovals")
103
- enforce_twofactor: Optional[bool] = Field(..., alias="enforceTwofactor")
104
- q_type: Optional[str] = Field(..., alias="type")
105
-
106
-
107
- class TerraformCloudflareAccountsQueryData(ConfiguredBaseModel):
108
- accounts: Optional[list[CloudflareAccountV1]] = Field(..., alias="accounts")
109
-
110
-
111
- def query(query_func: Callable, **kwargs: Any) -> TerraformCloudflareAccountsQueryData:
112
- """
113
- This is a convenience function which queries and parses the data into
114
- concrete types. It should be compatible with most GQL clients.
115
- You do not have to use it to consume the generated data classes.
116
- Alternatively, you can also mime and alternate the behavior
117
- of this function in the caller.
118
-
119
- Parameters:
120
- query_func (Callable): Function which queries your GQL Server
121
- kwargs: optional arguments that will be passed to the query function
122
-
123
- Returns:
124
- TerraformCloudflareAccountsQueryData: queried data parsed into generated classes
125
- """
126
- raw_data: dict[Any, Any] = query_func(DEFINITION, **kwargs)
127
- return TerraformCloudflareAccountsQueryData(**raw_data)
@@ -1,359 +0,0 @@
1
- """
2
- Generated by qenerate plugin=pydantic_v2. DO NOT MODIFY MANUALLY!
3
- """
4
- from collections.abc import Callable # noqa: F401 # pylint: disable=W0611
5
- from datetime import datetime # noqa: F401 # pylint: disable=W0611
6
- from enum import Enum # noqa: F401 # pylint: disable=W0611
7
- from typing import ( # noqa: F401 # pylint: disable=W0611
8
- Any,
9
- Optional,
10
- Union,
11
- )
12
-
13
- from pydantic import ( # noqa: F401 # pylint: disable=W0611
14
- BaseModel,
15
- ConfigDict,
16
- Field,
17
- Json,
18
- )
19
-
20
- from reconcile.gql_definitions.fragments.jumphost_common_fields import CommonJumphostFields
21
- from reconcile.gql_definitions.fragments.vault_secret import VaultSecret
22
-
23
-
24
- DEFINITION = """
25
- fragment CommonJumphostFields on ClusterJumpHost_v1 {
26
- hostname
27
- knownHosts
28
- user
29
- port
30
- remotePort
31
- identity {
32
- ...VaultSecret
33
- }
34
- }
35
-
36
- fragment VaultSecret on VaultSecret_v1 {
37
- path
38
- field
39
- version
40
- format
41
- }
42
-
43
- query TerraformCloudflareResources {
44
- namespaces: namespaces_v1 {
45
- name
46
- clusterAdmin
47
- cluster {
48
- name
49
- serverUrl
50
- insecureSkipTLSVerify
51
- jumpHost {
52
- ...CommonJumphostFields
53
- }
54
- automationToken {
55
- ...VaultSecret
56
- }
57
- clusterAdminAutomationToken {
58
- ...VaultSecret
59
- }
60
- spec {
61
- region
62
- }
63
- internal
64
- disable {
65
- integrations
66
- }
67
- }
68
- managedExternalResources
69
- externalResources {
70
- provider
71
- ... on NamespaceTerraformProviderResourceCloudflare_v1 {
72
- provider
73
- provisioner {
74
- name
75
- }
76
- resources {
77
- provider
78
- ... on NamespaceTerraformResourceCloudflareWorkerScript_v1 {
79
- identifier
80
- name
81
- content_from_github {
82
- repo
83
- path
84
- ref
85
- }
86
- vars {
87
- name
88
- text
89
- }
90
- }
91
- ... on NamespaceTerraformResourceCloudflareZone_v1 {
92
- identifier
93
- zone
94
- plan
95
- type
96
- settings
97
- argo {
98
- smart_routing
99
- tiered_caching
100
- }
101
- tiered_cache {
102
- cache_type
103
- }
104
- cache_reserve {
105
- enabled
106
- }
107
- records: dns_records {
108
- identifier
109
- name
110
- type
111
- ttl
112
- value
113
- proxied
114
- }
115
- workers {
116
- identifier
117
- pattern
118
- script_name
119
- }
120
- certificates {
121
- identifier
122
- type
123
- hosts
124
- validation_method
125
- validity_days
126
- certificate_authority
127
- cloudflare_branding
128
- wait_for_active_status
129
- }
130
- custom_ssl_certificates {
131
- identifier
132
- type
133
- bundle_method
134
- geo_restrictions
135
- certificate_secret {
136
- certificate {
137
- ...VaultSecret
138
- }
139
- key {
140
- ...VaultSecret
141
- }
142
- }
143
- }
144
- }
145
- ... on NamespaceTerraformResourceLogpushOwnershipChallenge_v1 {
146
- destination_conf
147
- zone_name: zone
148
- identifier
149
- }
150
- ... on NamespaceTerraformResourceLogpushJob_v1 {
151
- destination_conf
152
- zone_name: zone
153
- identifier
154
- enabled
155
- logpull_options
156
- ownership_challenge
157
- dataset
158
- frequency
159
- job_name: name
160
- filter
161
- kind
162
- }
163
- ... on NamespaceTerraformResourceLogpullRetention_v1 {
164
- zone
165
- enabled_flag: enabled
166
- identifier
167
- }
168
- }
169
- }
170
- }
171
- }
172
- }
173
- """
174
-
175
-
176
- class ConfiguredBaseModel(BaseModel):
177
- model_config = ConfigDict(
178
- extra='forbid'
179
- )
180
-
181
-
182
- class ClusterSpecV1(ConfiguredBaseModel):
183
- region: str = Field(..., alias="region")
184
-
185
-
186
- class DisableClusterAutomationsV1(ConfiguredBaseModel):
187
- integrations: Optional[list[str]] = Field(..., alias="integrations")
188
-
189
-
190
- class ClusterV1(ConfiguredBaseModel):
191
- name: str = Field(..., alias="name")
192
- server_url: str = Field(..., alias="serverUrl")
193
- insecure_skip_tls_verify: Optional[bool] = Field(..., alias="insecureSkipTLSVerify")
194
- jump_host: Optional[CommonJumphostFields] = Field(..., alias="jumpHost")
195
- automation_token: Optional[VaultSecret] = Field(..., alias="automationToken")
196
- cluster_admin_automation_token: Optional[VaultSecret] = Field(..., alias="clusterAdminAutomationToken")
197
- spec: Optional[ClusterSpecV1] = Field(..., alias="spec")
198
- internal: Optional[bool] = Field(..., alias="internal")
199
- disable: Optional[DisableClusterAutomationsV1] = Field(..., alias="disable")
200
-
201
-
202
- class NamespaceExternalResourceV1(ConfiguredBaseModel):
203
- provider: str = Field(..., alias="provider")
204
-
205
-
206
- class CloudflareAccountV1(ConfiguredBaseModel):
207
- name: str = Field(..., alias="name")
208
-
209
-
210
- class NamespaceTerraformResourceCloudflareV1(ConfiguredBaseModel):
211
- provider: str = Field(..., alias="provider")
212
-
213
-
214
- class CloudflareZoneWorkerScriptContentFromGithubV1(ConfiguredBaseModel):
215
- repo: str = Field(..., alias="repo")
216
- path: str = Field(..., alias="path")
217
- ref: str = Field(..., alias="ref")
218
-
219
-
220
- class CloudflareZoneWorkerScriptVarsV1(ConfiguredBaseModel):
221
- name: str = Field(..., alias="name")
222
- text: str = Field(..., alias="text")
223
-
224
-
225
- class NamespaceTerraformResourceCloudflareWorkerScriptV1(NamespaceTerraformResourceCloudflareV1):
226
- identifier: str = Field(..., alias="identifier")
227
- name: str = Field(..., alias="name")
228
- content_from_github: Optional[CloudflareZoneWorkerScriptContentFromGithubV1] = Field(..., alias="content_from_github")
229
- vars: Optional[list[CloudflareZoneWorkerScriptVarsV1]] = Field(..., alias="vars")
230
-
231
-
232
- class CloudflareZoneArgoV1(ConfiguredBaseModel):
233
- smart_routing: Optional[bool] = Field(..., alias="smart_routing")
234
- tiered_caching: Optional[bool] = Field(..., alias="tiered_caching")
235
-
236
-
237
- class CloudflareZoneTieredCacheV1(ConfiguredBaseModel):
238
- cache_type: str = Field(..., alias="cache_type")
239
-
240
-
241
- class CloudflareZoneCacheReserveV1(ConfiguredBaseModel):
242
- enabled: Optional[bool] = Field(..., alias="enabled")
243
-
244
-
245
- class CloudflareDnsRecordV1(ConfiguredBaseModel):
246
- identifier: str = Field(..., alias="identifier")
247
- name: str = Field(..., alias="name")
248
- q_type: str = Field(..., alias="type")
249
- ttl: int = Field(..., alias="ttl")
250
- value: Optional[str] = Field(..., alias="value")
251
- proxied: Optional[bool] = Field(..., alias="proxied")
252
-
253
-
254
- class CloudflareZoneWorkerV1(ConfiguredBaseModel):
255
- identifier: str = Field(..., alias="identifier")
256
- pattern: str = Field(..., alias="pattern")
257
- script_name: str = Field(..., alias="script_name")
258
-
259
-
260
- class CloudflareZoneCertificateV1(ConfiguredBaseModel):
261
- identifier: str = Field(..., alias="identifier")
262
- q_type: str = Field(..., alias="type")
263
- hosts: list[str] = Field(..., alias="hosts")
264
- validation_method: str = Field(..., alias="validation_method")
265
- validity_days: int = Field(..., alias="validity_days")
266
- certificate_authority: str = Field(..., alias="certificate_authority")
267
- cloudflare_branding: Optional[bool] = Field(..., alias="cloudflare_branding")
268
- wait_for_active_status: Optional[bool] = Field(..., alias="wait_for_active_status")
269
-
270
-
271
- class CertificateSecretV1(ConfiguredBaseModel):
272
- certificate: VaultSecret = Field(..., alias="certificate")
273
- key: VaultSecret = Field(..., alias="key")
274
-
275
-
276
- class CloudflareCustomSSLCertificateV1(ConfiguredBaseModel):
277
- identifier: str = Field(..., alias="identifier")
278
- q_type: str = Field(..., alias="type")
279
- bundle_method: Optional[str] = Field(..., alias="bundle_method")
280
- geo_restrictions: Optional[str] = Field(..., alias="geo_restrictions")
281
- certificate_secret: CertificateSecretV1 = Field(..., alias="certificate_secret")
282
-
283
-
284
- class NamespaceTerraformResourceCloudflareZoneV1(NamespaceTerraformResourceCloudflareV1):
285
- identifier: str = Field(..., alias="identifier")
286
- zone: str = Field(..., alias="zone")
287
- plan: Optional[str] = Field(..., alias="plan")
288
- q_type: Optional[str] = Field(..., alias="type")
289
- settings: Optional[Json] = Field(..., alias="settings")
290
- argo: Optional[CloudflareZoneArgoV1] = Field(..., alias="argo")
291
- tiered_cache: Optional[CloudflareZoneTieredCacheV1] = Field(..., alias="tiered_cache")
292
- cache_reserve: Optional[CloudflareZoneCacheReserveV1] = Field(..., alias="cache_reserve")
293
- records: Optional[list[CloudflareDnsRecordV1]] = Field(..., alias="records")
294
- workers: Optional[list[CloudflareZoneWorkerV1]] = Field(..., alias="workers")
295
- certificates: Optional[list[CloudflareZoneCertificateV1]] = Field(..., alias="certificates")
296
- custom_ssl_certificates: Optional[list[CloudflareCustomSSLCertificateV1]] = Field(..., alias="custom_ssl_certificates")
297
-
298
-
299
- class NamespaceTerraformResourceLogpushOwnershipChallengeV1(NamespaceTerraformResourceCloudflareV1):
300
- destination_conf: str = Field(..., alias="destination_conf")
301
- zone_name: Optional[str] = Field(..., alias="zone_name")
302
- identifier: str = Field(..., alias="identifier")
303
-
304
-
305
- class NamespaceTerraformResourceLogpushJobV1(NamespaceTerraformResourceCloudflareV1):
306
- destination_conf: str = Field(..., alias="destination_conf")
307
- zone_name: Optional[str] = Field(..., alias="zone_name")
308
- identifier: str = Field(..., alias="identifier")
309
- enabled: Optional[bool] = Field(..., alias="enabled")
310
- logpull_options: Optional[str] = Field(..., alias="logpull_options")
311
- ownership_challenge: Optional[str] = Field(..., alias="ownership_challenge")
312
- dataset: Optional[str] = Field(..., alias="dataset")
313
- frequency: Optional[str] = Field(..., alias="frequency")
314
- job_name: Optional[str] = Field(..., alias="job_name")
315
- filter: Optional[str] = Field(..., alias="filter")
316
- kind: Optional[str] = Field(..., alias="kind")
317
-
318
-
319
- class NamespaceTerraformResourceLogpullRetentionV1(NamespaceTerraformResourceCloudflareV1):
320
- zone: str = Field(..., alias="zone")
321
- enabled_flag: bool = Field(..., alias="enabled_flag")
322
- identifier: str = Field(..., alias="identifier")
323
-
324
-
325
- class NamespaceTerraformProviderResourceCloudflareV1(NamespaceExternalResourceV1):
326
- provider: str = Field(..., alias="provider")
327
- provisioner: CloudflareAccountV1 = Field(..., alias="provisioner")
328
- resources: list[Union[NamespaceTerraformResourceCloudflareZoneV1, NamespaceTerraformResourceLogpushJobV1, NamespaceTerraformResourceCloudflareWorkerScriptV1, NamespaceTerraformResourceLogpushOwnershipChallengeV1, NamespaceTerraformResourceLogpullRetentionV1, NamespaceTerraformResourceCloudflareV1]] = Field(..., alias="resources")
329
-
330
-
331
- class NamespaceV1(ConfiguredBaseModel):
332
- name: str = Field(..., alias="name")
333
- cluster_admin: Optional[bool] = Field(..., alias="clusterAdmin")
334
- cluster: ClusterV1 = Field(..., alias="cluster")
335
- managed_external_resources: Optional[bool] = Field(..., alias="managedExternalResources")
336
- external_resources: Optional[list[Union[NamespaceTerraformProviderResourceCloudflareV1, NamespaceExternalResourceV1]]] = Field(..., alias="externalResources")
337
-
338
-
339
- class TerraformCloudflareResourcesQueryData(ConfiguredBaseModel):
340
- namespaces: Optional[list[NamespaceV1]] = Field(..., alias="namespaces")
341
-
342
-
343
- def query(query_func: Callable, **kwargs: Any) -> TerraformCloudflareResourcesQueryData:
344
- """
345
- This is a convenience function which queries and parses the data into
346
- concrete types. It should be compatible with most GQL clients.
347
- You do not have to use it to consume the generated data classes.
348
- Alternatively, you can also mime and alternate the behavior
349
- of this function in the caller.
350
-
351
- Parameters:
352
- query_func (Callable): Function which queries your GQL Server
353
- kwargs: optional arguments that will be passed to the query function
354
-
355
- Returns:
356
- TerraformCloudflareResourcesQueryData: queried data parsed into generated classes
357
- """
358
- raw_data: dict[Any, Any] = query_func(DEFINITION, **kwargs)
359
- return TerraformCloudflareResourcesQueryData(**raw_data)