@gradientedge/cdk-utils 10.1.0 → 10.3.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/common/constants.d.ts +3 -2
- package/dist/src/lib/azure/common/constants.js +2 -1
- package/dist/src/lib/azure/common/construct.d.ts +26 -12
- package/dist/src/lib/azure/common/construct.js +31 -45
- package/dist/src/lib/azure/common/resource-name-formatter.d.ts +9 -4
- package/dist/src/lib/azure/common/resource-name-formatter.js +9 -5
- package/dist/src/lib/azure/common/stack.d.ts +18 -32
- package/dist/src/lib/azure/common/stack.js +77 -74
- package/dist/src/lib/azure/common/tagging.d.ts +29 -8
- package/dist/src/lib/azure/common/tagging.js +72 -26
- package/dist/src/lib/azure/common/types.d.ts +19 -4
- package/dist/src/lib/azure/services/api-management/main.d.ts +29 -32
- package/dist/src/lib/azure/services/api-management/main.js +100 -121
- package/dist/src/lib/azure/services/api-management/types.d.ts +33 -18
- package/dist/src/lib/azure/services/app-configuration/main.d.ts +6 -7
- package/dist/src/lib/azure/services/app-configuration/main.js +23 -26
- package/dist/src/lib/azure/services/app-configuration/types.d.ts +2 -2
- package/dist/src/lib/azure/services/app-service/main.d.ts +10 -12
- package/dist/src/lib/azure/services/app-service/main.js +37 -49
- package/dist/src/lib/azure/services/app-service/types.d.ts +4 -4
- package/dist/src/lib/azure/services/application-insights/main.d.ts +7 -8
- package/dist/src/lib/azure/services/application-insights/main.js +20 -26
- package/dist/src/lib/azure/services/application-insights/types.d.ts +2 -4
- package/dist/src/lib/azure/services/cosmosdb/main.d.ts +12 -15
- package/dist/src/lib/azure/services/cosmosdb/main.js +42 -61
- package/dist/src/lib/azure/services/cosmosdb/types.d.ts +4 -6
- package/dist/src/lib/azure/services/dns/main.d.ts +13 -17
- package/dist/src/lib/azure/services/dns/main.js +33 -51
- package/dist/src/lib/azure/services/dns/types.d.ts +5 -8
- package/dist/src/lib/azure/services/eventgrid/main.d.ts +20 -22
- package/dist/src/lib/azure/services/eventgrid/main.js +61 -89
- package/dist/src/lib/azure/services/eventgrid/types.d.ts +7 -8
- package/dist/src/lib/azure/services/function/main.d.ts +15 -15
- package/dist/src/lib/azure/services/function/main.js +54 -59
- package/dist/src/lib/azure/services/function/types.d.ts +18 -6
- package/dist/src/lib/azure/services/index.d.ts +1 -1
- package/dist/src/lib/azure/services/index.js +1 -1
- package/dist/src/lib/azure/services/key-vault/main.d.ts +6 -7
- package/dist/src/lib/azure/services/key-vault/main.js +29 -28
- package/dist/src/lib/azure/services/key-vault/types.d.ts +3 -2
- package/dist/src/lib/azure/services/monitor/main.d.ts +7 -8
- package/dist/src/lib/azure/services/monitor/main.js +10 -15
- package/dist/src/lib/azure/services/monitor/types.d.ts +2 -2
- package/dist/src/lib/azure/services/operational-insights/main.d.ts +29 -0
- package/dist/src/lib/azure/services/operational-insights/main.js +50 -0
- package/dist/src/lib/azure/services/operational-insights/types.d.ts +3 -0
- package/dist/src/lib/azure/services/redis/main.d.ts +8 -9
- package/dist/src/lib/azure/services/redis/main.js +24 -26
- package/dist/src/lib/azure/services/redis/types.d.ts +2 -2
- package/dist/src/lib/azure/services/resource-group/main.d.ts +6 -7
- package/dist/src/lib/azure/services/resource-group/main.js +9 -14
- package/dist/src/lib/azure/services/resource-group/types.d.ts +2 -2
- package/dist/src/lib/azure/services/servicebus/main.d.ts +17 -22
- package/dist/src/lib/azure/services/servicebus/main.js +47 -70
- package/dist/src/lib/azure/services/servicebus/types.d.ts +6 -10
- package/dist/src/lib/azure/services/storage/main.d.ts +24 -27
- package/dist/src/lib/azure/services/storage/main.js +70 -88
- package/dist/src/lib/azure/services/storage/types.d.ts +10 -8
- package/dist/src/lib/azure/types/index.d.ts +2 -1
- package/dist/src/lib/azure/utils/index.d.ts +19 -3
- package/dist/src/lib/azure/utils/index.js +19 -13
- package/dist/src/lib/cloudflare/common/stack.js +1 -1
- package/dist/src/lib/cloudflare/services/access/main.js +23 -23
- package/dist/src/lib/cloudflare/services/api-shield/main.js +11 -11
- package/dist/src/lib/cloudflare/services/argo/main.js +5 -5
- package/dist/src/lib/cloudflare/services/filter/main.js +3 -3
- package/dist/src/lib/cloudflare/services/firewall/main.js +3 -3
- package/dist/src/lib/cloudflare/services/page/main.js +7 -7
- package/dist/src/lib/cloudflare/services/record/main.js +3 -3
- package/dist/src/lib/cloudflare/services/rule-set/main.d.ts +1 -1
- package/dist/src/lib/cloudflare/services/rule-set/main.js +4 -5
- package/dist/src/lib/cloudflare/services/worker/main.js +13 -13
- package/dist/src/lib/cloudflare/services/zone/main.js +18 -18
- package/package.json +2 -1
- package/src/lib/azure/common/constants.ts +2 -1
- package/src/lib/azure/common/construct.ts +32 -48
- package/src/lib/azure/common/resource-name-formatter.ts +10 -6
- package/src/lib/azure/common/stack.ts +78 -78
- package/src/lib/azure/common/tagging.ts +78 -29
- package/src/lib/azure/common/types.ts +21 -4
- package/src/lib/azure/services/api-management/main.ts +172 -169
- package/src/lib/azure/services/api-management/types.ts +39 -16
- package/src/lib/azure/services/app-configuration/main.ts +33 -31
- package/src/lib/azure/services/app-configuration/types.ts +2 -2
- package/src/lib/azure/services/app-service/main.ts +61 -62
- package/src/lib/azure/services/app-service/types.ts +4 -4
- package/src/lib/azure/services/application-insights/main.ts +29 -30
- package/src/lib/azure/services/application-insights/types.ts +2 -5
- package/src/lib/azure/services/cosmosdb/main.ts +78 -77
- package/src/lib/azure/services/cosmosdb/types.ts +10 -6
- package/src/lib/azure/services/dns/main.ts +65 -72
- package/src/lib/azure/services/dns/types.ts +9 -9
- package/src/lib/azure/services/eventgrid/main.ts +120 -122
- package/src/lib/azure/services/eventgrid/types.ts +13 -8
- package/src/lib/azure/services/function/main.ts +75 -72
- package/src/lib/azure/services/function/types.ts +21 -6
- package/src/lib/azure/services/index.ts +1 -1
- package/src/lib/azure/services/key-vault/main.ts +38 -32
- package/src/lib/azure/services/key-vault/types.ts +4 -2
- package/src/lib/azure/services/monitor/main.ts +17 -21
- package/src/lib/azure/services/monitor/types.ts +2 -2
- package/src/lib/azure/services/operational-insights/main.ts +61 -0
- package/src/lib/azure/services/operational-insights/types.ts +3 -0
- package/src/lib/azure/services/redis/main.ts +30 -30
- package/src/lib/azure/services/redis/types.ts +2 -2
- package/src/lib/azure/services/resource-group/main.ts +20 -20
- package/src/lib/azure/services/resource-group/types.ts +2 -2
- package/src/lib/azure/services/servicebus/main.ts +103 -94
- package/src/lib/azure/services/servicebus/types.ts +17 -11
- package/src/lib/azure/services/storage/main.ts +113 -114
- package/src/lib/azure/services/storage/types.ts +16 -8
- package/src/lib/azure/types/index.ts +2 -1
- package/src/lib/azure/utils/index.ts +20 -22
- package/src/lib/cloudflare/common/stack.ts +1 -1
- package/src/lib/cloudflare/services/access/main.ts +114 -58
- package/src/lib/cloudflare/services/api-shield/main.ts +48 -22
- package/src/lib/cloudflare/services/argo/main.ts +17 -9
- package/src/lib/cloudflare/services/filter/main.ts +9 -5
- package/src/lib/cloudflare/services/firewall/main.ts +9 -5
- package/src/lib/cloudflare/services/page/main.ts +27 -15
- package/src/lib/cloudflare/services/record/main.ts +9 -5
- package/src/lib/cloudflare/services/rule-set/main.ts +10 -8
- package/src/lib/cloudflare/services/worker/main.ts +60 -29
- package/src/lib/cloudflare/services/zone/main.ts +75 -35
- package/dist/src/lib/azure/services/log-analytics-workspace/main.d.ts +0 -30
- package/dist/src/lib/azure/services/log-analytics-workspace/main.js +0 -55
- package/dist/src/lib/azure/services/log-analytics-workspace/types.d.ts +0 -3
- package/src/lib/azure/services/log-analytics-workspace/main.ts +0 -61
- package/src/lib/azure/services/log-analytics-workspace/types.ts +0 -3
- /package/dist/src/lib/azure/services/{log-analytics-workspace → operational-insights}/index.d.ts +0 -0
- /package/dist/src/lib/azure/services/{log-analytics-workspace → operational-insights}/index.js +0 -0
- /package/dist/src/lib/azure/services/{log-analytics-workspace → operational-insights}/types.js +0 -0
- /package/src/lib/azure/services/{log-analytics-workspace → operational-insights}/index.ts +0 -0
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import {
|
|
2
|
+
ApiShield,
|
|
3
|
+
ApiShieldOperation,
|
|
4
|
+
ApiShieldOperationSchemaValidationSettings,
|
|
5
|
+
ApiShieldSchema,
|
|
6
|
+
ApiShieldSchemaValidationSettings,
|
|
7
|
+
} from '@pulumi/cloudflare'
|
|
2
8
|
import { CommonCloudflareConstruct } from '../../common/index.js'
|
|
3
9
|
import {
|
|
4
10
|
ApiShieldOperationProps,
|
|
@@ -39,10 +45,14 @@ export class CloudflareApiShieldManager {
|
|
|
39
45
|
const zoneId = props.zoneId
|
|
40
46
|
? props.zoneId
|
|
41
47
|
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id
|
|
42
|
-
return new
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
48
|
+
return new ApiShield(
|
|
49
|
+
`${id}`,
|
|
50
|
+
{
|
|
51
|
+
...props,
|
|
52
|
+
zoneId,
|
|
53
|
+
},
|
|
54
|
+
{ parent: scope }
|
|
55
|
+
)
|
|
46
56
|
}
|
|
47
57
|
|
|
48
58
|
/**
|
|
@@ -58,11 +68,15 @@ export class CloudflareApiShieldManager {
|
|
|
58
68
|
const zoneId = props.zoneId
|
|
59
69
|
? props.zoneId
|
|
60
70
|
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id
|
|
61
|
-
return new
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
71
|
+
return new ApiShieldSchema(
|
|
72
|
+
`${id}`,
|
|
73
|
+
{
|
|
74
|
+
...props,
|
|
75
|
+
name: `${props.name}-${scope.props.stage}`,
|
|
76
|
+
zoneId,
|
|
77
|
+
},
|
|
78
|
+
{ parent: scope }
|
|
79
|
+
)
|
|
66
80
|
}
|
|
67
81
|
|
|
68
82
|
/**
|
|
@@ -82,10 +96,14 @@ export class CloudflareApiShieldManager {
|
|
|
82
96
|
const zoneId = props.zoneId
|
|
83
97
|
? props.zoneId
|
|
84
98
|
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id
|
|
85
|
-
return new
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
99
|
+
return new ApiShieldSchemaValidationSettings(
|
|
100
|
+
`${id}`,
|
|
101
|
+
{
|
|
102
|
+
...props,
|
|
103
|
+
zoneId,
|
|
104
|
+
},
|
|
105
|
+
{ parent: scope }
|
|
106
|
+
)
|
|
89
107
|
}
|
|
90
108
|
|
|
91
109
|
/**
|
|
@@ -101,10 +119,14 @@ export class CloudflareApiShieldManager {
|
|
|
101
119
|
const zoneId = props.zoneId
|
|
102
120
|
? props.zoneId
|
|
103
121
|
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id
|
|
104
|
-
return new
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
122
|
+
return new ApiShieldOperation(
|
|
123
|
+
`${id}`,
|
|
124
|
+
{
|
|
125
|
+
...props,
|
|
126
|
+
zoneId,
|
|
127
|
+
},
|
|
128
|
+
{ parent: scope }
|
|
129
|
+
)
|
|
108
130
|
}
|
|
109
131
|
|
|
110
132
|
/**
|
|
@@ -124,9 +146,13 @@ export class CloudflareApiShieldManager {
|
|
|
124
146
|
const zoneId = props.zoneId
|
|
125
147
|
? props.zoneId
|
|
126
148
|
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id
|
|
127
|
-
return new
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
149
|
+
return new ApiShieldOperationSchemaValidationSettings(
|
|
150
|
+
`${id}`,
|
|
151
|
+
{
|
|
152
|
+
...props,
|
|
153
|
+
zoneId,
|
|
154
|
+
},
|
|
155
|
+
{ parent: scope }
|
|
156
|
+
)
|
|
131
157
|
}
|
|
132
158
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ArgoSmartRouting, ArgoTieredCaching } from '@pulumi/cloudflare'
|
|
2
2
|
import { CommonCloudflareConstruct } from '../../common/index.js'
|
|
3
3
|
import { ArgoSmartRoutingProps, ArgoTieredCachingProps } from './types.js'
|
|
4
4
|
|
|
@@ -33,10 +33,14 @@ export class CloudflareArgoManager {
|
|
|
33
33
|
const zoneId = props.zoneId
|
|
34
34
|
? props.zoneId
|
|
35
35
|
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id
|
|
36
|
-
return new
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
return new ArgoSmartRouting(
|
|
37
|
+
`${id}`,
|
|
38
|
+
{
|
|
39
|
+
...props,
|
|
40
|
+
zoneId,
|
|
41
|
+
},
|
|
42
|
+
{ parent: scope }
|
|
43
|
+
)
|
|
40
44
|
}
|
|
41
45
|
|
|
42
46
|
/**
|
|
@@ -52,9 +56,13 @@ export class CloudflareArgoManager {
|
|
|
52
56
|
const zoneId = props.zoneId
|
|
53
57
|
? props.zoneId
|
|
54
58
|
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id
|
|
55
|
-
return new
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
+
return new ArgoTieredCaching(
|
|
60
|
+
`${id}`,
|
|
61
|
+
{
|
|
62
|
+
...props,
|
|
63
|
+
zoneId,
|
|
64
|
+
},
|
|
65
|
+
{ parent: scope }
|
|
66
|
+
)
|
|
59
67
|
}
|
|
60
68
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Filter } from '@pulumi/cloudflare'
|
|
2
2
|
import { CommonCloudflareConstruct } from '../../common/index.js'
|
|
3
3
|
import { FilterProps } from './types.js'
|
|
4
4
|
|
|
@@ -33,9 +33,13 @@ export class CloudflareFilterManager {
|
|
|
33
33
|
const zoneId = props.zoneId
|
|
34
34
|
? props.zoneId
|
|
35
35
|
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id
|
|
36
|
-
return new
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
return new Filter(
|
|
37
|
+
`${id}`,
|
|
38
|
+
{
|
|
39
|
+
...props,
|
|
40
|
+
zoneId,
|
|
41
|
+
},
|
|
42
|
+
{ parent: scope }
|
|
43
|
+
)
|
|
40
44
|
}
|
|
41
45
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { FirewallRule } from '@pulumi/cloudflare'
|
|
2
2
|
import { CommonCloudflareConstruct } from '../../common/index.js'
|
|
3
3
|
import { FirewallRuleProps } from './types.js'
|
|
4
4
|
|
|
@@ -33,9 +33,13 @@ export class CloudflareFirewallManager {
|
|
|
33
33
|
const zoneId = props.zoneId
|
|
34
34
|
? props.zoneId
|
|
35
35
|
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id
|
|
36
|
-
return new
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
return new FirewallRule(
|
|
37
|
+
`${id}`,
|
|
38
|
+
{
|
|
39
|
+
...props,
|
|
40
|
+
zoneId,
|
|
41
|
+
},
|
|
42
|
+
{ parent: scope }
|
|
43
|
+
)
|
|
40
44
|
}
|
|
41
45
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { PageRule, PagesDomain, PagesProject } from '@pulumi/cloudflare'
|
|
2
2
|
import { local } from '@pulumi/command'
|
|
3
3
|
import { CommonCloudflareConstruct } from '../../common/index.js'
|
|
4
4
|
import { PageRuleProps, PagesDomainProps, PagesProjectDeployProps, PagesProjectProps } from './types.js'
|
|
@@ -31,11 +31,15 @@ export class CloudflarePageManager {
|
|
|
31
31
|
public createPagesProject(id: string, scope: CommonCloudflareConstruct, props: PagesProjectProps) {
|
|
32
32
|
if (!props) throw `Props undefined for ${id}`
|
|
33
33
|
|
|
34
|
-
return new
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
34
|
+
return new PagesProject(
|
|
35
|
+
`${id}`,
|
|
36
|
+
{
|
|
37
|
+
...props,
|
|
38
|
+
accountId: props.accountId ?? scope.props.accountId,
|
|
39
|
+
name: `${props.name}-${scope.props.stage}`,
|
|
40
|
+
},
|
|
41
|
+
{ parent: scope }
|
|
42
|
+
)
|
|
39
43
|
}
|
|
40
44
|
|
|
41
45
|
/**
|
|
@@ -48,11 +52,15 @@ export class CloudflarePageManager {
|
|
|
48
52
|
public createPagesDomain(id: string, scope: CommonCloudflareConstruct, props: PagesDomainProps) {
|
|
49
53
|
if (!props) throw `Props undefined for ${id}`
|
|
50
54
|
|
|
51
|
-
return new
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
55
|
+
return new PagesDomain(
|
|
56
|
+
`${id}`,
|
|
57
|
+
{
|
|
58
|
+
...props,
|
|
59
|
+
accountId: props.accountId ?? scope.props.accountId,
|
|
60
|
+
name: props.name ?? scope.props.domainName,
|
|
61
|
+
},
|
|
62
|
+
{ parent: scope }
|
|
63
|
+
)
|
|
56
64
|
}
|
|
57
65
|
|
|
58
66
|
/**
|
|
@@ -68,10 +76,14 @@ export class CloudflarePageManager {
|
|
|
68
76
|
const zoneId = props.zoneId
|
|
69
77
|
? props.zoneId
|
|
70
78
|
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id
|
|
71
|
-
return new
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
79
|
+
return new PageRule(
|
|
80
|
+
`${id}`,
|
|
81
|
+
{
|
|
82
|
+
...props,
|
|
83
|
+
zoneId,
|
|
84
|
+
},
|
|
85
|
+
{ parent: scope }
|
|
86
|
+
)
|
|
75
87
|
}
|
|
76
88
|
|
|
77
89
|
public deployPagesProject(id: string, scope: CommonCloudflareConstruct, props: PagesProjectDeployProps) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { DnsRecord } from '@pulumi/cloudflare'
|
|
2
2
|
import { CommonCloudflareConstruct } from '../../common/index.js'
|
|
3
3
|
import { DnsRecordProps } from './types.js'
|
|
4
4
|
|
|
@@ -33,9 +33,13 @@ export class CloudflareRecordManager {
|
|
|
33
33
|
const zoneId = props.zoneId
|
|
34
34
|
? props.zoneId
|
|
35
35
|
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id
|
|
36
|
-
return new
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
return new DnsRecord(
|
|
37
|
+
id,
|
|
38
|
+
{
|
|
39
|
+
...props,
|
|
40
|
+
zoneId,
|
|
41
|
+
},
|
|
42
|
+
{ parent: scope }
|
|
43
|
+
)
|
|
40
44
|
}
|
|
41
45
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Ruleset } from '@pulumi/cloudflare'
|
|
2
2
|
import { CommonCloudflareConstruct } from '../../common/index.js'
|
|
3
3
|
import { RulesetProps } from './types.js'
|
|
4
4
|
|
|
@@ -25,7 +25,7 @@ export class CloudflareRuleSetManager {
|
|
|
25
25
|
* @param id scoped id of the resource
|
|
26
26
|
* @param scope scope in which this resource is defined
|
|
27
27
|
* @param props rule set properties
|
|
28
|
-
* @see [Pulumi Cloudflare Ruleset]{@link https://www.pulumi.com/registry/packages
|
|
28
|
+
* @see [Pulumi Cloudflare Ruleset]{@link https://www.pulumi.com/registry/packages//api-docs/ruleset/}
|
|
29
29
|
*/
|
|
30
30
|
public createRuleSet(id: string, scope: CommonCloudflareConstruct, props: RulesetProps) {
|
|
31
31
|
if (!props) throw `Props undefined for ${id}`
|
|
@@ -33,11 +33,13 @@ export class CloudflareRuleSetManager {
|
|
|
33
33
|
const zoneId = props.zoneId
|
|
34
34
|
? props.zoneId
|
|
35
35
|
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
36
|
+
return new Ruleset(
|
|
37
|
+
`${id}`,
|
|
38
|
+
{
|
|
39
|
+
...props,
|
|
40
|
+
zoneId,
|
|
41
|
+
},
|
|
42
|
+
{ parent: scope }
|
|
43
|
+
)
|
|
42
44
|
}
|
|
43
45
|
}
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import {
|
|
2
|
+
WorkersCronTrigger,
|
|
3
|
+
WorkersCustomDomain,
|
|
4
|
+
WorkersKv,
|
|
5
|
+
WorkersKvNamespace,
|
|
6
|
+
WorkersRoute,
|
|
7
|
+
WorkersScript,
|
|
8
|
+
} from '@pulumi/cloudflare'
|
|
2
9
|
import { CommonCloudflareConstruct } from '../../common/index.js'
|
|
3
10
|
import {
|
|
4
11
|
WorkerCronTriggerProps,
|
|
@@ -40,11 +47,15 @@ export class CloudflareWorkerManager {
|
|
|
40
47
|
const zoneId = props.zoneId
|
|
41
48
|
? props.zoneId
|
|
42
49
|
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id
|
|
43
|
-
return new
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
50
|
+
return new WorkersCustomDomain(
|
|
51
|
+
id,
|
|
52
|
+
{
|
|
53
|
+
...props,
|
|
54
|
+
accountId: props.accountId ?? scope.props.accountId,
|
|
55
|
+
zoneId,
|
|
56
|
+
},
|
|
57
|
+
{ parent: scope }
|
|
58
|
+
)
|
|
48
59
|
}
|
|
49
60
|
|
|
50
61
|
/**
|
|
@@ -61,11 +72,15 @@ export class CloudflareWorkerManager {
|
|
|
61
72
|
? props.zoneId
|
|
62
73
|
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id
|
|
63
74
|
|
|
64
|
-
return new
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
75
|
+
return new WorkersRoute(
|
|
76
|
+
id,
|
|
77
|
+
{
|
|
78
|
+
...props,
|
|
79
|
+
script: `${props.script}-${scope.props.stage}`,
|
|
80
|
+
zoneId,
|
|
81
|
+
},
|
|
82
|
+
{ parent: scope }
|
|
83
|
+
)
|
|
69
84
|
}
|
|
70
85
|
|
|
71
86
|
/**
|
|
@@ -78,11 +93,15 @@ export class CloudflareWorkerManager {
|
|
|
78
93
|
public createWorkerScript(id: string, scope: CommonCloudflareConstruct, props: WorkerScriptProps) {
|
|
79
94
|
if (!props) throw `Props undefined for ${id}`
|
|
80
95
|
|
|
81
|
-
return new
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
96
|
+
return new WorkersScript(
|
|
97
|
+
id,
|
|
98
|
+
{
|
|
99
|
+
...props,
|
|
100
|
+
accountId: props.accountId ?? scope.props.accountId,
|
|
101
|
+
scriptName: `${props.scriptName}-${scope.props.stage}`,
|
|
102
|
+
},
|
|
103
|
+
{ parent: scope }
|
|
104
|
+
)
|
|
86
105
|
}
|
|
87
106
|
|
|
88
107
|
/**
|
|
@@ -95,11 +114,15 @@ export class CloudflareWorkerManager {
|
|
|
95
114
|
public createWorkersKvNamespace(id: string, scope: CommonCloudflareConstruct, props: WorkersKvNamespaceProps) {
|
|
96
115
|
if (!props) throw `Props undefined for ${id}`
|
|
97
116
|
|
|
98
|
-
return new
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
117
|
+
return new WorkersKvNamespace(
|
|
118
|
+
id,
|
|
119
|
+
{
|
|
120
|
+
...props,
|
|
121
|
+
accountId: props.accountId ?? scope.props.accountId,
|
|
122
|
+
title: scope.isProductionStage() ? props.title : `${props.title}-${scope.props.stage}`,
|
|
123
|
+
},
|
|
124
|
+
{ parent: scope }
|
|
125
|
+
)
|
|
103
126
|
}
|
|
104
127
|
|
|
105
128
|
/**
|
|
@@ -112,10 +135,14 @@ export class CloudflareWorkerManager {
|
|
|
112
135
|
public createWorkersKv(id: string, scope: CommonCloudflareConstruct, props: WorkersKvProps) {
|
|
113
136
|
if (!props) throw `Props undefined for ${id}`
|
|
114
137
|
|
|
115
|
-
return new
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
138
|
+
return new WorkersKv(
|
|
139
|
+
id,
|
|
140
|
+
{
|
|
141
|
+
...props,
|
|
142
|
+
accountId: props.accountId ?? scope.props.accountId,
|
|
143
|
+
},
|
|
144
|
+
{ parent: scope }
|
|
145
|
+
)
|
|
119
146
|
}
|
|
120
147
|
|
|
121
148
|
/**
|
|
@@ -128,9 +155,13 @@ export class CloudflareWorkerManager {
|
|
|
128
155
|
public createWorkerCronTrigger(id: string, scope: CommonCloudflareConstruct, props: WorkerCronTriggerProps) {
|
|
129
156
|
if (!props) throw `Props undefined for ${id}`
|
|
130
157
|
|
|
131
|
-
return new
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
158
|
+
return new WorkersCronTrigger(
|
|
159
|
+
id,
|
|
160
|
+
{
|
|
161
|
+
...props,
|
|
162
|
+
accountId: props.accountId ?? scope.props.accountId,
|
|
163
|
+
},
|
|
164
|
+
{ parent: scope }
|
|
165
|
+
)
|
|
135
166
|
}
|
|
136
167
|
}
|
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import {
|
|
2
|
+
Zone,
|
|
3
|
+
ZoneCacheReserve,
|
|
4
|
+
ZoneCacheVariants,
|
|
5
|
+
ZoneDnssec,
|
|
6
|
+
ZoneHold,
|
|
7
|
+
ZoneLockdown,
|
|
8
|
+
ZoneSetting,
|
|
9
|
+
} from '@pulumi/cloudflare'
|
|
2
10
|
import * as pulumi from '@pulumi/pulumi'
|
|
3
11
|
import { CommonCloudflareConstruct } from '../../common/index.js'
|
|
4
12
|
import {
|
|
@@ -39,16 +47,20 @@ export class CloudflareZoneManager {
|
|
|
39
47
|
public createZone(id: string, scope: CommonCloudflareConstruct, props: ZoneProps) {
|
|
40
48
|
if (!props) throw `Props undefined for ${id}`
|
|
41
49
|
|
|
42
|
-
return new
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
50
|
+
return new Zone(
|
|
51
|
+
id,
|
|
52
|
+
{
|
|
53
|
+
...props,
|
|
54
|
+
account: props.account ?? scope.props.accountId,
|
|
55
|
+
name: scope.props.domainName,
|
|
56
|
+
},
|
|
57
|
+
{ parent: scope }
|
|
58
|
+
)
|
|
47
59
|
}
|
|
48
60
|
|
|
49
61
|
public resolveZone(id: string, scope: CommonCloudflareConstruct, options?: GetZoneProps) {
|
|
50
62
|
const name = options?.filter?.name ?? scope.props.domainName
|
|
51
|
-
return
|
|
63
|
+
return Zone.get(name, id)
|
|
52
64
|
}
|
|
53
65
|
|
|
54
66
|
/**
|
|
@@ -63,10 +75,14 @@ export class CloudflareZoneManager {
|
|
|
63
75
|
const zoneId =
|
|
64
76
|
props.zoneId ??
|
|
65
77
|
pulumi.output(this.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })).id
|
|
66
|
-
return new
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
78
|
+
return new ZoneCacheReserve(
|
|
79
|
+
id,
|
|
80
|
+
{
|
|
81
|
+
...props,
|
|
82
|
+
zoneId,
|
|
83
|
+
},
|
|
84
|
+
{ parent: scope }
|
|
85
|
+
)
|
|
70
86
|
}
|
|
71
87
|
|
|
72
88
|
/**
|
|
@@ -81,10 +97,14 @@ export class CloudflareZoneManager {
|
|
|
81
97
|
const zoneId =
|
|
82
98
|
props.zoneId ??
|
|
83
99
|
pulumi.output(this.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })).id
|
|
84
|
-
return new
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
100
|
+
return new ZoneCacheVariants(
|
|
101
|
+
id,
|
|
102
|
+
{
|
|
103
|
+
...props,
|
|
104
|
+
zoneId,
|
|
105
|
+
},
|
|
106
|
+
{ parent: scope }
|
|
107
|
+
)
|
|
88
108
|
}
|
|
89
109
|
|
|
90
110
|
/**
|
|
@@ -99,10 +119,14 @@ export class CloudflareZoneManager {
|
|
|
99
119
|
const zoneId =
|
|
100
120
|
props.zoneId ??
|
|
101
121
|
pulumi.output(this.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })).id
|
|
102
|
-
return new
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
122
|
+
return new ZoneDnssec(
|
|
123
|
+
id,
|
|
124
|
+
{
|
|
125
|
+
...props,
|
|
126
|
+
zoneId,
|
|
127
|
+
},
|
|
128
|
+
{ parent: scope }
|
|
129
|
+
)
|
|
106
130
|
}
|
|
107
131
|
|
|
108
132
|
/**
|
|
@@ -117,10 +141,14 @@ export class CloudflareZoneManager {
|
|
|
117
141
|
const zoneId =
|
|
118
142
|
props.zoneId ??
|
|
119
143
|
pulumi.output(this.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })).id
|
|
120
|
-
return new
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
144
|
+
return new ZoneHold(
|
|
145
|
+
id,
|
|
146
|
+
{
|
|
147
|
+
...props,
|
|
148
|
+
zoneId,
|
|
149
|
+
},
|
|
150
|
+
{ parent: scope }
|
|
151
|
+
)
|
|
124
152
|
}
|
|
125
153
|
|
|
126
154
|
/**
|
|
@@ -135,10 +163,14 @@ export class CloudflareZoneManager {
|
|
|
135
163
|
const zoneId =
|
|
136
164
|
props.zoneId ??
|
|
137
165
|
pulumi.output(this.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })).id
|
|
138
|
-
return new
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
166
|
+
return new ZoneLockdown(
|
|
167
|
+
id,
|
|
168
|
+
{
|
|
169
|
+
...props,
|
|
170
|
+
zoneId,
|
|
171
|
+
},
|
|
172
|
+
{ parent: scope }
|
|
173
|
+
)
|
|
142
174
|
}
|
|
143
175
|
|
|
144
176
|
/**
|
|
@@ -153,10 +185,14 @@ export class CloudflareZoneManager {
|
|
|
153
185
|
const zoneId =
|
|
154
186
|
props.zoneId ??
|
|
155
187
|
pulumi.output(this.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })).id
|
|
156
|
-
const zoneDnsSettings = new
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
188
|
+
const zoneDnsSettings = new ZoneSetting(
|
|
189
|
+
id,
|
|
190
|
+
{
|
|
191
|
+
...props,
|
|
192
|
+
zoneId,
|
|
193
|
+
},
|
|
194
|
+
{ parent: scope }
|
|
195
|
+
)
|
|
160
196
|
|
|
161
197
|
return zoneDnsSettings
|
|
162
198
|
}
|
|
@@ -173,9 +209,13 @@ export class CloudflareZoneManager {
|
|
|
173
209
|
const zoneId =
|
|
174
210
|
props.zoneId ??
|
|
175
211
|
pulumi.output(this.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })).id
|
|
176
|
-
return new
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
212
|
+
return new ZoneSetting(
|
|
213
|
+
id,
|
|
214
|
+
{
|
|
215
|
+
...props,
|
|
216
|
+
zoneId,
|
|
217
|
+
},
|
|
218
|
+
{ parent: scope }
|
|
219
|
+
)
|
|
180
220
|
}
|
|
181
221
|
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { LogAnalyticsWorkspace } from '@cdktf/provider-azurerm/lib/log-analytics-workspace/index.js';
|
|
2
|
-
import { CommonAzureConstruct } from '../../common/index.js';
|
|
3
|
-
import { LogAnalyticsWorkspaceProps } from './types.js';
|
|
4
|
-
/**
|
|
5
|
-
* @classdesc Provides operations on Azure Log Analytics Workspace
|
|
6
|
-
* - A new instance of this class is injected into {@link CommonAzureConstruct} constructor.
|
|
7
|
-
* - If a custom construct extends {@link CommonAzureConstruct}, an instance is available within the context.
|
|
8
|
-
* @example
|
|
9
|
-
* ```
|
|
10
|
-
* import { CommonAzureConstruct, CommonAzureStackProps } from '@gradientedge/cdk-utils'
|
|
11
|
-
*
|
|
12
|
-
* class CustomConstruct extends CommonAzureConstruct {
|
|
13
|
-
* constructor(parent: Construct, id: string, props: CommonAzureStackProps) {
|
|
14
|
-
* super(parent, id, props)
|
|
15
|
-
* this.props = props
|
|
16
|
-
* this.LogAnalyticWorkspaceManager.createLogAnalyticsWorkspace('MyLogAnalyticsWorkspace', this, props)
|
|
17
|
-
* }
|
|
18
|
-
* }
|
|
19
|
-
* ```
|
|
20
|
-
*/
|
|
21
|
-
export declare class AzureLogAnalyticsWorkspaceManager {
|
|
22
|
-
/**
|
|
23
|
-
* @summary Method to create a new cosmosdb account
|
|
24
|
-
* @param id scoped id of the resource
|
|
25
|
-
* @param scope scope in which this resource is defined
|
|
26
|
-
* @param props cosmosdb account properties
|
|
27
|
-
* @see [CDKTF CosmosDb Account Module]{@link https://github.com/cdktf/cdktf-provider-azurerm/blob/main/docs/logAnalyticsWorkspace.typescript.md}
|
|
28
|
-
*/
|
|
29
|
-
createLogAnalyticsWorkspace(id: string, scope: CommonAzureConstruct, props: LogAnalyticsWorkspaceProps): LogAnalyticsWorkspace;
|
|
30
|
-
}
|