@gradientedge/cdk-utils 9.88.0 → 10.0.0
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.
- package/dist/src/lib/azure/services/api-management/main.d.ts +2 -2
- package/dist/src/lib/azure/services/api-management/main.js +1 -1
- package/dist/src/lib/azure/services/redis/main.d.ts +5 -5
- package/dist/src/lib/azure/services/redis/main.js +10 -10
- package/dist/src/lib/azure/services/redis/types.d.ts +2 -2
- package/dist/src/lib/cloudflare/common/construct.d.ts +7 -19
- package/dist/src/lib/cloudflare/common/construct.js +12 -66
- package/dist/src/lib/cloudflare/common/index.d.ts +0 -1
- package/dist/src/lib/cloudflare/common/index.js +0 -1
- package/dist/src/lib/cloudflare/common/stack.d.ts +11 -21
- package/dist/src/lib/cloudflare/common/stack.js +55 -62
- package/dist/src/lib/cloudflare/common/types.d.ts +2 -14
- package/dist/src/lib/cloudflare/construct/pages-static-site/main.d.ts +8 -10
- package/dist/src/lib/cloudflare/construct/pages-static-site/main.js +18 -25
- package/dist/src/lib/cloudflare/construct/worker-site/main.d.ts +13 -10
- package/dist/src/lib/cloudflare/construct/worker-site/main.js +29 -41
- package/dist/src/lib/cloudflare/index.d.ts +0 -1
- package/dist/src/lib/cloudflare/index.js +0 -1
- package/dist/src/lib/cloudflare/services/access/main.d.ts +31 -43
- package/dist/src/lib/cloudflare/services/access/main.js +56 -83
- package/dist/src/lib/cloudflare/services/access/types.d.ts +12 -22
- package/dist/src/lib/cloudflare/services/api-shield/main.d.ts +10 -15
- package/dist/src/lib/cloudflare/services/api-shield/main.js +16 -36
- package/dist/src/lib/cloudflare/services/api-shield/types.d.ts +6 -10
- package/dist/src/lib/cloudflare/services/argo/main.d.ts +6 -8
- package/dist/src/lib/cloudflare/services/argo/main.js +9 -17
- package/dist/src/lib/cloudflare/services/argo/types.d.ts +3 -4
- package/dist/src/lib/cloudflare/services/filter/main.d.ts +3 -4
- package/dist/src/lib/cloudflare/services/filter/main.js +6 -10
- package/dist/src/lib/cloudflare/services/filter/types.d.ts +2 -2
- package/dist/src/lib/cloudflare/services/firewall/main.d.ts +2 -3
- package/dist/src/lib/cloudflare/services/firewall/main.js +4 -8
- package/dist/src/lib/cloudflare/services/firewall/types.d.ts +2 -2
- package/dist/src/lib/cloudflare/services/page/main.d.ts +7 -11
- package/dist/src/lib/cloudflare/services/page/main.js +13 -26
- package/dist/src/lib/cloudflare/services/page/types.d.ts +4 -6
- package/dist/src/lib/cloudflare/services/record/main.d.ts +2 -3
- package/dist/src/lib/cloudflare/services/record/main.js +4 -8
- package/dist/src/lib/cloudflare/services/record/types.d.ts +2 -2
- package/dist/src/lib/cloudflare/services/rule-set/main.d.ts +5 -6
- package/dist/src/lib/cloudflare/services/rule-set/main.js +7 -10
- package/dist/src/lib/cloudflare/services/rule-set/types.d.ts +2 -2
- package/dist/src/lib/cloudflare/services/worker/main.d.ts +12 -18
- package/dist/src/lib/cloudflare/services/worker/main.js +15 -39
- package/dist/src/lib/cloudflare/services/worker/types.d.ts +7 -12
- package/dist/src/lib/cloudflare/services/zone/main.d.ts +13 -30
- package/dist/src/lib/cloudflare/services/zone/main.js +31 -84
- package/dist/src/lib/cloudflare/services/zone/types.d.ts +10 -20
- package/dist/src/lib/common/types.d.ts +4 -0
- package/package.json +7 -1
- package/src/lib/azure/services/api-management/main.ts +3 -3
- package/src/lib/azure/services/redis/main.ts +11 -11
- package/src/lib/azure/services/redis/types.ts +2 -2
- package/src/lib/cloudflare/common/construct.ts +13 -70
- package/src/lib/cloudflare/common/index.ts +0 -1
- package/src/lib/cloudflare/common/stack.ts +58 -69
- package/src/lib/cloudflare/common/types.ts +2 -15
- package/src/lib/cloudflare/construct/pages-static-site/main.ts +22 -42
- package/src/lib/cloudflare/construct/worker-site/main.ts +38 -62
- package/src/lib/cloudflare/index.ts +0 -1
- package/src/lib/cloudflare/services/access/main.ts +57 -118
- package/src/lib/cloudflare/services/access/types.ts +24 -22
- package/src/lib/cloudflare/services/api-shield/main.ts +16 -63
- package/src/lib/cloudflare/services/api-shield/types.ts +12 -10
- package/src/lib/cloudflare/services/argo/main.ts +9 -23
- package/src/lib/cloudflare/services/argo/types.ts +3 -4
- package/src/lib/cloudflare/services/filter/main.ts +6 -13
- package/src/lib/cloudflare/services/filter/types.ts +2 -2
- package/src/lib/cloudflare/services/firewall/main.ts +4 -11
- package/src/lib/cloudflare/services/firewall/types.ts +2 -2
- package/src/lib/cloudflare/services/page/main.ts +19 -36
- package/src/lib/cloudflare/services/page/types.ts +4 -6
- package/src/lib/cloudflare/services/record/main.ts +4 -11
- package/src/lib/cloudflare/services/record/types.ts +2 -2
- package/src/lib/cloudflare/services/rule-set/main.ts +7 -12
- package/src/lib/cloudflare/services/rule-set/types.ts +2 -2
- package/src/lib/cloudflare/services/worker/main.ts +15 -52
- package/src/lib/cloudflare/services/worker/types.ts +14 -12
- package/src/lib/cloudflare/services/zone/main.ts +40 -103
- package/src/lib/cloudflare/services/zone/types.ts +20 -21
- package/src/lib/common/types.ts +5 -0
- package/dist/src/lib/cloudflare/common/constants.d.ts +0 -5
- package/dist/src/lib/cloudflare/common/constants.js +0 -6
- package/dist/src/lib/cloudflare/utils/index.d.ts +0 -3
- package/dist/src/lib/cloudflare/utils/index.js +0 -13
- package/src/lib/cloudflare/common/constants.ts +0 -5
- package/src/lib/cloudflare/utils/index.ts +0 -23
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { ApiShieldOperation } from '@cdktf/provider-cloudflare/lib/api-shield-operation/index.js'
|
|
3
|
-
import { ApiShieldSchemaValidationSettings } from '@cdktf/provider-cloudflare/lib/api-shield-schema-validation-settings/index.js'
|
|
4
|
-
import { ApiShieldSchema } from '@cdktf/provider-cloudflare/lib/api-shield-schema/index.js'
|
|
5
|
-
import { ApiShield } from '@cdktf/provider-cloudflare/lib/api-shield/index.js'
|
|
1
|
+
import * as cloudflare from '@pulumi/cloudflare'
|
|
6
2
|
import { CommonCloudflareConstruct } from '../../common/index.js'
|
|
7
|
-
import { createCloudflareTfOutput } from '../../utils/index.js'
|
|
8
3
|
import {
|
|
9
4
|
ApiShieldOperationProps,
|
|
10
5
|
ApiShieldOperationSchemaValidationSettingsProps,
|
|
@@ -36,24 +31,18 @@ export class CloudflareApiShieldManager {
|
|
|
36
31
|
* @param id scoped id of the resource
|
|
37
32
|
* @param scope scope in which this resource is defined
|
|
38
33
|
* @param props api shield properties
|
|
39
|
-
* @see [
|
|
34
|
+
* @see [Pulumi API Shield]{@link https://www.pulumi.com/registry/packages/cloudflare/api-docs/apishield/}
|
|
40
35
|
*/
|
|
41
36
|
public createApiShield(id: string, scope: CommonCloudflareConstruct, props: ApiShieldProps) {
|
|
42
37
|
if (!props) throw `Props undefined for ${id}`
|
|
43
38
|
|
|
44
39
|
const zoneId = props.zoneId
|
|
45
40
|
? props.zoneId
|
|
46
|
-
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { name: scope.props.domainName })?.
|
|
47
|
-
|
|
48
|
-
const apiShield = new ApiShield(scope, `${id}`, {
|
|
41
|
+
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id
|
|
42
|
+
return new cloudflare.ApiShield(`${id}`, {
|
|
49
43
|
...props,
|
|
50
44
|
zoneId,
|
|
51
45
|
})
|
|
52
|
-
|
|
53
|
-
createCloudflareTfOutput(`${id}-apiShieldFriendlyUniqueId`, scope, apiShield.friendlyUniqueId)
|
|
54
|
-
createCloudflareTfOutput(`${id}-apiShieldId`, scope, apiShield.id)
|
|
55
|
-
|
|
56
|
-
return apiShield
|
|
57
46
|
}
|
|
58
47
|
|
|
59
48
|
/**
|
|
@@ -61,25 +50,19 @@ export class CloudflareApiShieldManager {
|
|
|
61
50
|
* @param id scoped id of the resource
|
|
62
51
|
* @param scope scope in which this resource is defined
|
|
63
52
|
* @param props api shield schema properties
|
|
64
|
-
* @see [
|
|
53
|
+
* @see [Pulumi API Shield Schema]{@link https://www.pulumi.com/registry/packages/cloudflare/api-docs/apishieldschema/}
|
|
65
54
|
*/
|
|
66
55
|
public createApiShieldSchema(id: string, scope: CommonCloudflareConstruct, props: ApiShieldSchemaProps) {
|
|
67
56
|
if (!props) throw `Props undefined for ${id}`
|
|
68
57
|
|
|
69
58
|
const zoneId = props.zoneId
|
|
70
59
|
? props.zoneId
|
|
71
|
-
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { name: scope.props.domainName })?.
|
|
72
|
-
|
|
73
|
-
const apiShieldSchema = new ApiShieldSchema(scope, `${id}`, {
|
|
60
|
+
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id
|
|
61
|
+
return new cloudflare.ApiShieldSchema(`${id}`, {
|
|
74
62
|
...props,
|
|
75
63
|
name: `${props.name}-${scope.props.stage}`,
|
|
76
64
|
zoneId,
|
|
77
65
|
})
|
|
78
|
-
|
|
79
|
-
createCloudflareTfOutput(`${id}-apiShieldSchemaFriendlyUniqueId`, scope, apiShieldSchema.friendlyUniqueId)
|
|
80
|
-
createCloudflareTfOutput(`${id}-apiShieldSchemaId`, scope, apiShieldSchema.schemaId)
|
|
81
|
-
|
|
82
|
-
return apiShieldSchema
|
|
83
66
|
}
|
|
84
67
|
|
|
85
68
|
/**
|
|
@@ -87,7 +70,7 @@ export class CloudflareApiShieldManager {
|
|
|
87
70
|
* @param id scoped id of the resource
|
|
88
71
|
* @param scope scope in which this resource is defined
|
|
89
72
|
* @param props api shield schema validation settings properties
|
|
90
|
-
* @see [
|
|
73
|
+
* @see [Pulumi API Shield Schema Validation Settings]{@link https://www.pulumi.com/registry/packages/cloudflare/api-docs/apishieldschemavalidationsettings/}
|
|
91
74
|
*/
|
|
92
75
|
public createApiShieldSchemaValidationSettings(
|
|
93
76
|
id: string,
|
|
@@ -98,21 +81,11 @@ export class CloudflareApiShieldManager {
|
|
|
98
81
|
|
|
99
82
|
const zoneId = props.zoneId
|
|
100
83
|
? props.zoneId
|
|
101
|
-
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { name: scope.props.domainName })?.
|
|
102
|
-
|
|
103
|
-
const apiShieldSchemaValidationSettings = new ApiShieldSchemaValidationSettings(scope, `${id}`, {
|
|
84
|
+
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id
|
|
85
|
+
return new cloudflare.ApiShieldSchemaValidationSettings(`${id}`, {
|
|
104
86
|
...props,
|
|
105
87
|
zoneId,
|
|
106
88
|
})
|
|
107
|
-
|
|
108
|
-
createCloudflareTfOutput(
|
|
109
|
-
`${id}-apiShieldSchemaValidationSettingsFriendlyUniqueId`,
|
|
110
|
-
scope,
|
|
111
|
-
apiShieldSchemaValidationSettings.friendlyUniqueId
|
|
112
|
-
)
|
|
113
|
-
createCloudflareTfOutput(`${id}-apiShieldSchemaValidationSettingsId`, scope, apiShieldSchemaValidationSettings.id)
|
|
114
|
-
|
|
115
|
-
return apiShieldSchemaValidationSettings
|
|
116
89
|
}
|
|
117
90
|
|
|
118
91
|
/**
|
|
@@ -120,24 +93,18 @@ export class CloudflareApiShieldManager {
|
|
|
120
93
|
* @param id scoped id of the resource
|
|
121
94
|
* @param scope scope in which this resource is defined
|
|
122
95
|
* @param props api shield operation properties
|
|
123
|
-
* @see [
|
|
96
|
+
* @see [Pulumi API Shield Operation]{@link https://www.pulumi.com/registry/packages/cloudflare/api-docs/apishieldoperation/}
|
|
124
97
|
*/
|
|
125
98
|
public createApiShieldOperation(id: string, scope: CommonCloudflareConstruct, props: ApiShieldOperationProps) {
|
|
126
99
|
if (!props) throw `Props undefined for ${id}`
|
|
127
100
|
|
|
128
101
|
const zoneId = props.zoneId
|
|
129
102
|
? props.zoneId
|
|
130
|
-
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { name: scope.props.domainName })?.
|
|
131
|
-
|
|
132
|
-
const apiShieldOperation = new ApiShieldOperation(scope, `${id}`, {
|
|
103
|
+
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id
|
|
104
|
+
return new cloudflare.ApiShieldOperation(`${id}`, {
|
|
133
105
|
...props,
|
|
134
106
|
zoneId,
|
|
135
107
|
})
|
|
136
|
-
|
|
137
|
-
createCloudflareTfOutput(`${id}-apiShieldOperationFriendlyUniqueId`, scope, apiShieldOperation.friendlyUniqueId)
|
|
138
|
-
createCloudflareTfOutput(`${id}-apiShieldOperationId`, scope, apiShieldOperation.id)
|
|
139
|
-
|
|
140
|
-
return apiShieldOperation
|
|
141
108
|
}
|
|
142
109
|
|
|
143
110
|
/**
|
|
@@ -145,7 +112,7 @@ export class CloudflareApiShieldManager {
|
|
|
145
112
|
* @param id scoped id of the resource
|
|
146
113
|
* @param scope scope in which this resource is defined
|
|
147
114
|
* @param props api shield operation schema validation settings properties
|
|
148
|
-
* @see [
|
|
115
|
+
* @see [Pulumi API Shield Operation Schema Validation Settings]{@link https://www.pulumi.com/registry/packages/cloudflare/api-docs/apishieldoperationschemavalidationsettings/}
|
|
149
116
|
*/
|
|
150
117
|
public createApiShieldOperationSchemaValidationSettings(
|
|
151
118
|
id: string,
|
|
@@ -156,24 +123,10 @@ export class CloudflareApiShieldManager {
|
|
|
156
123
|
|
|
157
124
|
const zoneId = props.zoneId
|
|
158
125
|
? props.zoneId
|
|
159
|
-
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { name: scope.props.domainName })?.
|
|
160
|
-
|
|
161
|
-
const apiShieldOperationSchemaValidationSettings = new ApiShieldOperationSchemaValidationSettings(scope, `${id}`, {
|
|
126
|
+
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id
|
|
127
|
+
return new cloudflare.ApiShieldOperationSchemaValidationSettings(`${id}`, {
|
|
162
128
|
...props,
|
|
163
129
|
zoneId,
|
|
164
130
|
})
|
|
165
|
-
|
|
166
|
-
createCloudflareTfOutput(
|
|
167
|
-
`${id}-apiShieldOperationSchemaValidationSettingsFriendlyUniqueId`,
|
|
168
|
-
scope,
|
|
169
|
-
apiShieldOperationSchemaValidationSettings.friendlyUniqueId
|
|
170
|
-
)
|
|
171
|
-
createCloudflareTfOutput(
|
|
172
|
-
`${id}-apiShieldOperationSchemaValidationSettingsId`,
|
|
173
|
-
scope,
|
|
174
|
-
apiShieldOperationSchemaValidationSettings.id
|
|
175
|
-
)
|
|
176
|
-
|
|
177
|
-
return apiShieldOperationSchemaValidationSettings
|
|
178
131
|
}
|
|
179
132
|
}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import {
|
|
2
|
+
ApiShieldArgs,
|
|
3
|
+
ApiShieldOperationArgs,
|
|
4
|
+
ApiShieldOperationSchemaValidationSettingsArgs,
|
|
5
|
+
ApiShieldSchemaArgs,
|
|
6
|
+
ApiShieldSchemaValidationSettingsArgs,
|
|
7
|
+
} from '@pulumi/cloudflare'
|
|
6
8
|
|
|
7
|
-
export interface ApiShieldProps extends
|
|
8
|
-
export interface ApiShieldSchemaProps extends
|
|
9
|
-
export interface ApiShieldSchemaValidationSettingsProps extends
|
|
10
|
-
export interface ApiShieldOperationProps extends
|
|
11
|
-
export interface ApiShieldOperationSchemaValidationSettingsProps extends
|
|
9
|
+
export interface ApiShieldProps extends ApiShieldArgs {}
|
|
10
|
+
export interface ApiShieldSchemaProps extends ApiShieldSchemaArgs {}
|
|
11
|
+
export interface ApiShieldSchemaValidationSettingsProps extends ApiShieldSchemaValidationSettingsArgs {}
|
|
12
|
+
export interface ApiShieldOperationProps extends ApiShieldOperationArgs {}
|
|
13
|
+
export interface ApiShieldOperationSchemaValidationSettingsProps extends ApiShieldOperationSchemaValidationSettingsArgs {}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { ArgoTieredCaching } from '@cdktf/provider-cloudflare/lib/argo-tiered-caching/index.js'
|
|
1
|
+
import * as cloudflare from '@pulumi/cloudflare'
|
|
3
2
|
import { CommonCloudflareConstruct } from '../../common/index.js'
|
|
4
|
-
import { createCloudflareTfOutput } from '../../utils/index.js'
|
|
5
3
|
import { ArgoSmartRoutingProps, ArgoTieredCachingProps } from './types.js'
|
|
6
4
|
|
|
7
5
|
/**
|
|
@@ -23,52 +21,40 @@ import { ArgoSmartRoutingProps, ArgoTieredCachingProps } from './types.js'
|
|
|
23
21
|
*/
|
|
24
22
|
export class CloudflareArgoManager {
|
|
25
23
|
/**
|
|
26
|
-
* @summary Method to create a new Cloudflare Argo
|
|
24
|
+
* @summary Method to create a new Cloudflare Argo Smart Routing
|
|
27
25
|
* @param id scoped id of the resource
|
|
28
26
|
* @param scope scope in which this resource is defined
|
|
29
27
|
* @param props argo properties
|
|
30
|
-
* @see [
|
|
28
|
+
* @see [Pulumi Cloudflare ArgoSmartRouting]{@link https://www.pulumi.com/registry/packages/cloudflare/api-docs/argosmartrouting/}
|
|
31
29
|
*/
|
|
32
30
|
public createArgoSmartRouting(id: string, scope: CommonCloudflareConstruct, props: ArgoSmartRoutingProps) {
|
|
33
31
|
if (!props) throw `Props undefined for ${id}`
|
|
34
32
|
|
|
35
33
|
const zoneId = props.zoneId
|
|
36
34
|
? props.zoneId
|
|
37
|
-
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { name: scope.props.domainName })?.
|
|
38
|
-
|
|
39
|
-
const argoSmartRouting = new ArgoSmartRouting(scope, `${id}`, {
|
|
35
|
+
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id
|
|
36
|
+
return new cloudflare.ArgoSmartRouting(`${id}`, {
|
|
40
37
|
...props,
|
|
41
38
|
zoneId,
|
|
42
39
|
})
|
|
43
|
-
|
|
44
|
-
createCloudflareTfOutput(`${id}-argoSmartRoutingFriendlyUniqueId`, scope, argoSmartRouting.friendlyUniqueId)
|
|
45
|
-
createCloudflareTfOutput(`${id}-argoSmartRoutingId`, scope, argoSmartRouting.id)
|
|
46
|
-
|
|
47
|
-
return argoSmartRouting
|
|
48
40
|
}
|
|
49
41
|
|
|
50
42
|
/**
|
|
51
|
-
* @summary Method to create a new Cloudflare Argo
|
|
43
|
+
* @summary Method to create a new Cloudflare Argo Tiered Caching
|
|
52
44
|
* @param id scoped id of the resource
|
|
53
45
|
* @param scope scope in which this resource is defined
|
|
54
46
|
* @param props argo properties
|
|
55
|
-
* @see [
|
|
47
|
+
* @see [Pulumi Cloudflare ArgoTieredCaching]{@link https://www.pulumi.com/registry/packages/cloudflare/api-docs/argotieredcaching/}
|
|
56
48
|
*/
|
|
57
49
|
public createArgoTieredCaching(id: string, scope: CommonCloudflareConstruct, props: ArgoTieredCachingProps) {
|
|
58
50
|
if (!props) throw `Props undefined for ${id}`
|
|
59
51
|
|
|
60
52
|
const zoneId = props.zoneId
|
|
61
53
|
? props.zoneId
|
|
62
|
-
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { name: scope.props.domainName })?.
|
|
63
|
-
|
|
64
|
-
const argoTieredCaching = new ArgoTieredCaching(scope, `${id}`, {
|
|
54
|
+
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id
|
|
55
|
+
return new cloudflare.ArgoTieredCaching(`${id}`, {
|
|
65
56
|
...props,
|
|
66
57
|
zoneId,
|
|
67
58
|
})
|
|
68
|
-
|
|
69
|
-
createCloudflareTfOutput(`${id}-argoTieredCachingFriendlyUniqueId`, scope, argoTieredCaching.friendlyUniqueId)
|
|
70
|
-
createCloudflareTfOutput(`${id}-argoTieredCachingId`, scope, argoTieredCaching.id)
|
|
71
|
-
|
|
72
|
-
return argoTieredCaching
|
|
73
59
|
}
|
|
74
60
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ArgoTieredCachingConfig } from '@cdktf/provider-cloudflare/lib/argo-tiered-caching/index.js'
|
|
1
|
+
import { ArgoSmartRoutingArgs, ArgoTieredCachingArgs } from '@pulumi/cloudflare'
|
|
3
2
|
|
|
4
|
-
export interface ArgoSmartRoutingProps extends
|
|
5
|
-
export interface ArgoTieredCachingProps extends
|
|
3
|
+
export interface ArgoSmartRoutingProps extends ArgoSmartRoutingArgs {}
|
|
4
|
+
export interface ArgoTieredCachingProps extends ArgoTieredCachingArgs {}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as cloudflare from '@pulumi/cloudflare'
|
|
2
2
|
import { CommonCloudflareConstruct } from '../../common/index.js'
|
|
3
|
-
import { createCloudflareTfOutput } from '../../utils/index.js'
|
|
4
3
|
import { FilterProps } from './types.js'
|
|
5
4
|
|
|
6
5
|
/**
|
|
@@ -15,7 +14,7 @@ import { FilterProps } from './types.js'
|
|
|
15
14
|
* constructor(parent: Construct, id: string, props: CommonCloudflareStackProps) {
|
|
16
15
|
* super(parent, id, props)
|
|
17
16
|
* this.props = props
|
|
18
|
-
* this.filterManager.
|
|
17
|
+
* this.filterManager.createFilter('MyFilter', this, props)
|
|
19
18
|
* }
|
|
20
19
|
* }
|
|
21
20
|
* ```
|
|
@@ -26,23 +25,17 @@ export class CloudflareFilterManager {
|
|
|
26
25
|
* @param id scoped id of the resource
|
|
27
26
|
* @param scope scope in which this resource is defined
|
|
28
27
|
* @param props filter properties
|
|
29
|
-
* @see [
|
|
28
|
+
* @see [Pulumi Cloudflare Filter]{@link https://www.pulumi.com/registry/packages/cloudflare/api-docs/filter/}
|
|
30
29
|
*/
|
|
31
|
-
public
|
|
30
|
+
public createFilter(id: string, scope: CommonCloudflareConstruct, props: FilterProps) {
|
|
32
31
|
if (!props) throw `Props undefined for ${id}`
|
|
33
32
|
|
|
34
33
|
const zoneId = props.zoneId
|
|
35
34
|
? props.zoneId
|
|
36
|
-
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { name: scope.props.domainName })?.
|
|
37
|
-
|
|
38
|
-
const filter = new Filter(scope, `${id}`, {
|
|
35
|
+
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id
|
|
36
|
+
return new cloudflare.Filter(`${id}`, {
|
|
39
37
|
...props,
|
|
40
38
|
zoneId,
|
|
41
39
|
})
|
|
42
|
-
|
|
43
|
-
createCloudflareTfOutput(`${id}-filterFriendlyUniqueId`, scope, filter.friendlyUniqueId)
|
|
44
|
-
createCloudflareTfOutput(`${id}-filterId`, scope, filter.id)
|
|
45
|
-
|
|
46
|
-
return filter
|
|
47
40
|
}
|
|
48
41
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FilterArgs } from '@pulumi/cloudflare'
|
|
2
2
|
|
|
3
|
-
export interface FilterProps extends
|
|
3
|
+
export interface FilterProps extends FilterArgs {}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as cloudflare from '@pulumi/cloudflare'
|
|
2
2
|
import { CommonCloudflareConstruct } from '../../common/index.js'
|
|
3
|
-
import { createCloudflareTfOutput } from '../../utils/index.js'
|
|
4
3
|
import { FirewallRuleProps } from './types.js'
|
|
5
4
|
|
|
6
5
|
/**
|
|
@@ -26,23 +25,17 @@ export class CloudflareFirewallManager {
|
|
|
26
25
|
* @param id scoped id of the resource
|
|
27
26
|
* @param scope scope in which this resource is defined
|
|
28
27
|
* @param props firewall rule properties
|
|
29
|
-
* @see [
|
|
28
|
+
* @see [Pulumi Cloudflare Firewall Rule]{@link https://www.pulumi.com/registry/packages/cloudflare/api-docs/firewallrule/}
|
|
30
29
|
*/
|
|
31
30
|
public createFirewallRule(id: string, scope: CommonCloudflareConstruct, props: FirewallRuleProps) {
|
|
32
31
|
if (!props) throw `Props undefined for ${id}`
|
|
33
32
|
|
|
34
33
|
const zoneId = props.zoneId
|
|
35
34
|
? props.zoneId
|
|
36
|
-
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { name: scope.props.domainName })?.
|
|
37
|
-
|
|
38
|
-
const firewallRule = new FirewallRule(scope, `${id}`, {
|
|
35
|
+
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id
|
|
36
|
+
return new cloudflare.FirewallRule(`${id}`, {
|
|
39
37
|
...props,
|
|
40
38
|
zoneId,
|
|
41
39
|
})
|
|
42
|
-
|
|
43
|
-
createCloudflareTfOutput(`${id}-firewallRuleFriendlyUniqueId`, scope, firewallRule.friendlyUniqueId)
|
|
44
|
-
createCloudflareTfOutput(`${id}-firewallRuleId`, scope, firewallRule.id)
|
|
45
|
-
|
|
46
|
-
return firewallRule
|
|
47
40
|
}
|
|
48
41
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FirewallRuleArgs } from '@pulumi/cloudflare'
|
|
2
2
|
|
|
3
|
-
export interface FirewallRuleProps extends
|
|
3
|
+
export interface FirewallRuleProps extends FirewallRuleArgs {}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import { PagesProject } from '@cdktf/provider-cloudflare/lib/pages-project/index.js'
|
|
4
|
-
import { LocalExec, Provider } from 'cdktf-local-exec'
|
|
1
|
+
import * as cloudflare from '@pulumi/cloudflare'
|
|
2
|
+
import { local } from '@pulumi/command'
|
|
5
3
|
import { CommonCloudflareConstruct } from '../../common/index.js'
|
|
6
|
-
import { createCloudflareTfOutput } from '../../utils/index.js'
|
|
7
4
|
import { PageRuleProps, PagesDomainProps, PagesProjectDeployProps, PagesProjectProps } from './types.js'
|
|
8
5
|
|
|
9
6
|
/**
|
|
@@ -29,21 +26,16 @@ export class CloudflarePageManager {
|
|
|
29
26
|
* @param id scoped id of the resource
|
|
30
27
|
* @param scope scope in which this resource is defined
|
|
31
28
|
* @param props pages project properties
|
|
32
|
-
* @see [
|
|
29
|
+
* @see [Pulumi Cloudflare Pages Project]{@link https://www.pulumi.com/registry/packages/cloudflare/api-docs/pagesproject/}
|
|
33
30
|
*/
|
|
34
31
|
public createPagesProject(id: string, scope: CommonCloudflareConstruct, props: PagesProjectProps) {
|
|
35
32
|
if (!props) throw `Props undefined for ${id}`
|
|
36
33
|
|
|
37
|
-
|
|
34
|
+
return new cloudflare.PagesProject(`${id}`, {
|
|
38
35
|
...props,
|
|
39
36
|
accountId: props.accountId ?? scope.props.accountId,
|
|
40
37
|
name: `${props.name}-${scope.props.stage}`,
|
|
41
38
|
})
|
|
42
|
-
|
|
43
|
-
createCloudflareTfOutput(`${id}-pagesProjectFriendlyUniqueId`, scope, pagesProject.friendlyUniqueId)
|
|
44
|
-
createCloudflareTfOutput(`${id}-pagesProjectId`, scope, pagesProject.id)
|
|
45
|
-
|
|
46
|
-
return pagesProject
|
|
47
39
|
}
|
|
48
40
|
|
|
49
41
|
/**
|
|
@@ -51,21 +43,16 @@ export class CloudflarePageManager {
|
|
|
51
43
|
* @param id scoped id of the resource
|
|
52
44
|
* @param scope scope in which this resource is defined
|
|
53
45
|
* @param props pages domain properties
|
|
54
|
-
* @see [
|
|
46
|
+
* @see [Pulumi Cloudflare Pages Domain]{@link https://www.pulumi.com/registry/packages/cloudflare/api-docs/pagesdomain/}
|
|
55
47
|
*/
|
|
56
48
|
public createPagesDomain(id: string, scope: CommonCloudflareConstruct, props: PagesDomainProps) {
|
|
57
49
|
if (!props) throw `Props undefined for ${id}`
|
|
58
50
|
|
|
59
|
-
|
|
51
|
+
return new cloudflare.PagesDomain(`${id}`, {
|
|
60
52
|
...props,
|
|
61
53
|
accountId: props.accountId ?? scope.props.accountId,
|
|
62
54
|
name: props.name ?? scope.props.domainName,
|
|
63
55
|
})
|
|
64
|
-
|
|
65
|
-
createCloudflareTfOutput(`${id}-pagesDomainFriendlyUniqueId`, scope, pagesDomain.friendlyUniqueId)
|
|
66
|
-
createCloudflareTfOutput(`${id}-pagesDomainId`, scope, pagesDomain.id)
|
|
67
|
-
|
|
68
|
-
return pagesDomain
|
|
69
56
|
}
|
|
70
57
|
|
|
71
58
|
/**
|
|
@@ -73,37 +60,33 @@ export class CloudflarePageManager {
|
|
|
73
60
|
* @param id scoped id of the resource
|
|
74
61
|
* @param scope scope in which this resource is defined
|
|
75
62
|
* @param props page rule properties
|
|
76
|
-
* @see [
|
|
63
|
+
* @see [Pulumi Cloudflare Page Rule]{@link https://www.pulumi.com/registry/packages/cloudflare/api-docs/pagerule/}
|
|
77
64
|
*/
|
|
78
65
|
public createPageRule(id: string, scope: CommonCloudflareConstruct, props: PageRuleProps) {
|
|
79
66
|
if (!props) throw `Props undefined for ${id}`
|
|
80
67
|
|
|
81
68
|
const zoneId = props.zoneId
|
|
82
69
|
? props.zoneId
|
|
83
|
-
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { name: scope.props.domainName })?.
|
|
84
|
-
|
|
85
|
-
const pageRule = new PageRule(scope, `${id}`, {
|
|
70
|
+
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id
|
|
71
|
+
return new cloudflare.PageRule(`${id}`, {
|
|
86
72
|
...props,
|
|
87
73
|
zoneId,
|
|
88
74
|
})
|
|
89
|
-
|
|
90
|
-
createCloudflareTfOutput(`${id}-pageRuleFriendlyUniqueId`, scope, pageRule.friendlyUniqueId)
|
|
91
|
-
createCloudflareTfOutput(`${id}-pageRuleId`, scope, pageRule.id)
|
|
92
|
-
|
|
93
|
-
return pageRule
|
|
94
75
|
}
|
|
95
76
|
|
|
96
77
|
public deployPagesProject(id: string, scope: CommonCloudflareConstruct, props: PagesProjectDeployProps) {
|
|
97
78
|
if (!props) throw `Props undefined for ${id}`
|
|
98
79
|
|
|
99
|
-
new Provider(scope, `${id}`)
|
|
100
80
|
const message = process.env.BUILD_NUMBER ?? props.message
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
81
|
+
return new local.Command(
|
|
82
|
+
`${id}-deploy-${new Date().toISOString()}`,
|
|
83
|
+
{
|
|
84
|
+
create: `CLOUDFLARE_ACCOUNT_ID=${scope.props.accountId} CLOUDFLARE_API_TOKEN=${scope.props.apiToken} npx wrangler pages deploy ${props.directory} --project-name=${props.projectName} --branch=${props.branch} --commit-message=${message}`,
|
|
85
|
+
dir: '',
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
dependsOn: props.dependsOn,
|
|
89
|
+
}
|
|
90
|
+
)
|
|
108
91
|
}
|
|
109
92
|
}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { PagesDomainConfig } from '@cdktf/provider-cloudflare/lib/pages-domain/index.js'
|
|
3
|
-
import { PagesProjectConfig } from '@cdktf/provider-cloudflare/lib/pages-project/index.js'
|
|
1
|
+
import { PageRuleArgs, PagesDomainArgs, PagesProjectArgs } from '@pulumi/cloudflare'
|
|
4
2
|
|
|
5
|
-
export interface PagesProjectProps extends
|
|
6
|
-
export interface PagesDomainProps extends
|
|
7
|
-
export interface PageRuleProps extends
|
|
3
|
+
export interface PagesProjectProps extends PagesProjectArgs {}
|
|
4
|
+
export interface PagesDomainProps extends PagesDomainArgs {}
|
|
5
|
+
export interface PageRuleProps extends PageRuleArgs {}
|
|
8
6
|
export interface PagesProjectDeployProps {
|
|
9
7
|
branch: string
|
|
10
8
|
directory: string
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as cloudflare from '@pulumi/cloudflare'
|
|
2
2
|
import { CommonCloudflareConstruct } from '../../common/index.js'
|
|
3
|
-
import { createCloudflareTfOutput } from '../../utils/index.js'
|
|
4
3
|
import { DnsRecordProps } from './types.js'
|
|
5
4
|
|
|
6
5
|
/**
|
|
@@ -26,23 +25,17 @@ export class CloudflareRecordManager {
|
|
|
26
25
|
* @param id scoped id of the resource
|
|
27
26
|
* @param scope scope in which this resource is defined
|
|
28
27
|
* @param props record properties
|
|
29
|
-
* @see [
|
|
28
|
+
* @see [Pulumi Cloudflare Record]{@link https://www.pulumi.com/registry/packages/cloudflare/api-docs/record/}
|
|
30
29
|
*/
|
|
31
30
|
public createRecord(id: string, scope: CommonCloudflareConstruct, props: DnsRecordProps) {
|
|
32
31
|
if (!props) throw `Props undefined for ${id}`
|
|
33
32
|
|
|
34
33
|
const zoneId = props.zoneId
|
|
35
34
|
? props.zoneId
|
|
36
|
-
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { name: scope.props.domainName })?.
|
|
37
|
-
|
|
38
|
-
const record = new DnsRecord(scope, `${id}`, {
|
|
35
|
+
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id
|
|
36
|
+
return new cloudflare.DnsRecord(id, {
|
|
39
37
|
...props,
|
|
40
38
|
zoneId,
|
|
41
39
|
})
|
|
42
|
-
|
|
43
|
-
createCloudflareTfOutput(`${id}-recordFriendlyUniqueId`, scope, record.friendlyUniqueId)
|
|
44
|
-
createCloudflareTfOutput(`${id}-recordId`, scope, record.id)
|
|
45
|
-
|
|
46
|
-
return record
|
|
47
40
|
}
|
|
48
41
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DnsRecordArgs } from '@pulumi/cloudflare'
|
|
2
2
|
|
|
3
|
-
export interface DnsRecordProps extends
|
|
3
|
+
export interface DnsRecordProps extends DnsRecordArgs {}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as cloudflare from '@pulumi/cloudflare'
|
|
2
2
|
import { CommonCloudflareConstruct } from '../../common/index.js'
|
|
3
|
-
import { createCloudflareTfOutput } from '../../utils/index.js'
|
|
4
3
|
import { RulesetProps } from './types.js'
|
|
5
4
|
|
|
6
5
|
/**
|
|
@@ -9,11 +8,11 @@ import { RulesetProps } from './types.js'
|
|
|
9
8
|
* - If a custom construct extends {@link CommonCloudflareConstruct}, an instance is available within the context.
|
|
10
9
|
* @example
|
|
11
10
|
* ```
|
|
12
|
-
* import { CommonCloudflareConstruct
|
|
11
|
+
* import { CommonCloudflareConstruct } from '@gradientedge/cdk-utils'
|
|
13
12
|
*
|
|
14
13
|
* class CustomConstruct extends CommonCloudflareConstruct {
|
|
15
|
-
* constructor(parent:
|
|
16
|
-
* super(parent,
|
|
14
|
+
* constructor(parent: pulumi.ComponentResource, name: string, props: CommonCloudflareStackProps) {
|
|
15
|
+
* super(parent, name, props)
|
|
17
16
|
* this.props = props
|
|
18
17
|
* this.ruleSetManager.createRuleSet('MyRule', this, props)
|
|
19
18
|
* }
|
|
@@ -26,23 +25,19 @@ export class CloudflareRuleSetManager {
|
|
|
26
25
|
* @param id scoped id of the resource
|
|
27
26
|
* @param scope scope in which this resource is defined
|
|
28
27
|
* @param props rule set properties
|
|
29
|
-
* @see [
|
|
28
|
+
* @see [Pulumi Cloudflare Ruleset]{@link https://www.pulumi.com/registry/packages/cloudflare/api-docs/ruleset/}
|
|
30
29
|
*/
|
|
31
30
|
public createRuleSet(id: string, scope: CommonCloudflareConstruct, props: RulesetProps) {
|
|
32
31
|
if (!props) throw `Props undefined for ${id}`
|
|
33
32
|
|
|
34
33
|
const zoneId = props.zoneId
|
|
35
34
|
? props.zoneId
|
|
36
|
-
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { name: scope.props.domainName })?.
|
|
37
|
-
|
|
38
|
-
const ruleSet = new Ruleset(scope, `${id}`, {
|
|
35
|
+
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id
|
|
36
|
+
const ruleSet = new cloudflare.Ruleset(`${id}`, {
|
|
39
37
|
...props,
|
|
40
38
|
zoneId,
|
|
41
39
|
})
|
|
42
40
|
|
|
43
|
-
createCloudflareTfOutput(`${id}-ruleSetFriendlyUniqueId`, scope, ruleSet.friendlyUniqueId)
|
|
44
|
-
createCloudflareTfOutput(`${id}-ruleSetId`, scope, ruleSet.id)
|
|
45
|
-
|
|
46
41
|
return ruleSet
|
|
47
42
|
}
|
|
48
43
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as cloudflare from '@pulumi/cloudflare'
|
|
2
2
|
|
|
3
|
-
export interface RulesetProps extends
|
|
3
|
+
export interface RulesetProps extends cloudflare.RulesetArgs {}
|