@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,6 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { ArgoTieredCaching } from '@cdktf/provider-cloudflare/lib/argo-tiered-caching/index.js';
|
|
3
|
-
import { createCloudflareTfOutput } from '../../utils/index.js';
|
|
1
|
+
import * as cloudflare from '@pulumi/cloudflare';
|
|
4
2
|
/**
|
|
5
3
|
* @classdesc Provides operations on Cloudflare Argo
|
|
6
4
|
* - A new instance of this class is injected into {@link CommonCloudflareConstruct} constructor.
|
|
@@ -20,45 +18,39 @@ import { createCloudflareTfOutput } from '../../utils/index.js';
|
|
|
20
18
|
*/
|
|
21
19
|
export class CloudflareArgoManager {
|
|
22
20
|
/**
|
|
23
|
-
* @summary Method to create a new Cloudflare Argo
|
|
21
|
+
* @summary Method to create a new Cloudflare Argo Smart Routing
|
|
24
22
|
* @param id scoped id of the resource
|
|
25
23
|
* @param scope scope in which this resource is defined
|
|
26
24
|
* @param props argo properties
|
|
27
|
-
* @see [
|
|
25
|
+
* @see [Pulumi Cloudflare ArgoSmartRouting]{@link https://www.pulumi.com/registry/packages/cloudflare/api-docs/argosmartrouting/}
|
|
28
26
|
*/
|
|
29
27
|
createArgoSmartRouting(id, scope, props) {
|
|
30
28
|
if (!props)
|
|
31
29
|
throw `Props undefined for ${id}`;
|
|
32
30
|
const zoneId = props.zoneId
|
|
33
31
|
? props.zoneId
|
|
34
|
-
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { name: scope.props.domainName })?.
|
|
35
|
-
|
|
32
|
+
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id;
|
|
33
|
+
return new cloudflare.ArgoSmartRouting(`${id}`, {
|
|
36
34
|
...props,
|
|
37
35
|
zoneId,
|
|
38
36
|
});
|
|
39
|
-
createCloudflareTfOutput(`${id}-argoSmartRoutingFriendlyUniqueId`, scope, argoSmartRouting.friendlyUniqueId);
|
|
40
|
-
createCloudflareTfOutput(`${id}-argoSmartRoutingId`, scope, argoSmartRouting.id);
|
|
41
|
-
return argoSmartRouting;
|
|
42
37
|
}
|
|
43
38
|
/**
|
|
44
|
-
* @summary Method to create a new Cloudflare Argo
|
|
39
|
+
* @summary Method to create a new Cloudflare Argo Tiered Caching
|
|
45
40
|
* @param id scoped id of the resource
|
|
46
41
|
* @param scope scope in which this resource is defined
|
|
47
42
|
* @param props argo properties
|
|
48
|
-
* @see [
|
|
43
|
+
* @see [Pulumi Cloudflare ArgoTieredCaching]{@link https://www.pulumi.com/registry/packages/cloudflare/api-docs/argotieredcaching/}
|
|
49
44
|
*/
|
|
50
45
|
createArgoTieredCaching(id, scope, props) {
|
|
51
46
|
if (!props)
|
|
52
47
|
throw `Props undefined for ${id}`;
|
|
53
48
|
const zoneId = props.zoneId
|
|
54
49
|
? props.zoneId
|
|
55
|
-
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { name: scope.props.domainName })?.
|
|
56
|
-
|
|
50
|
+
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id;
|
|
51
|
+
return new cloudflare.ArgoTieredCaching(`${id}`, {
|
|
57
52
|
...props,
|
|
58
53
|
zoneId,
|
|
59
54
|
});
|
|
60
|
-
createCloudflareTfOutput(`${id}-argoTieredCachingFriendlyUniqueId`, scope, argoTieredCaching.friendlyUniqueId);
|
|
61
|
-
createCloudflareTfOutput(`${id}-argoTieredCachingId`, scope, argoTieredCaching.id);
|
|
62
|
-
return argoTieredCaching;
|
|
63
55
|
}
|
|
64
56
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export interface ArgoSmartRoutingProps extends ArgoSmartRoutingConfig {
|
|
1
|
+
import { ArgoSmartRoutingArgs, ArgoTieredCachingArgs } from '@pulumi/cloudflare';
|
|
2
|
+
export interface ArgoSmartRoutingProps extends ArgoSmartRoutingArgs {
|
|
4
3
|
}
|
|
5
|
-
export interface ArgoTieredCachingProps extends
|
|
4
|
+
export interface ArgoTieredCachingProps extends ArgoTieredCachingArgs {
|
|
6
5
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Filter } from '@cdktf/provider-cloudflare/lib/filter/index.js';
|
|
2
1
|
import { CommonCloudflareConstruct } from '../../common/index.js';
|
|
3
2
|
import { FilterProps } from './types.js';
|
|
4
3
|
/**
|
|
@@ -13,7 +12,7 @@ import { FilterProps } from './types.js';
|
|
|
13
12
|
* constructor(parent: Construct, id: string, props: CommonCloudflareStackProps) {
|
|
14
13
|
* super(parent, id, props)
|
|
15
14
|
* this.props = props
|
|
16
|
-
* this.filterManager.
|
|
15
|
+
* this.filterManager.createFilter('MyFilter', this, props)
|
|
17
16
|
* }
|
|
18
17
|
* }
|
|
19
18
|
* ```
|
|
@@ -24,7 +23,7 @@ export declare class CloudflareFilterManager {
|
|
|
24
23
|
* @param id scoped id of the resource
|
|
25
24
|
* @param scope scope in which this resource is defined
|
|
26
25
|
* @param props filter properties
|
|
27
|
-
* @see [
|
|
26
|
+
* @see [Pulumi Cloudflare Filter]{@link https://www.pulumi.com/registry/packages/cloudflare/api-docs/filter/}
|
|
28
27
|
*/
|
|
29
|
-
|
|
28
|
+
createFilter(id: string, scope: CommonCloudflareConstruct, props: FilterProps): import("@pulumi/cloudflare/filter.js").Filter;
|
|
30
29
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { createCloudflareTfOutput } from '../../utils/index.js';
|
|
1
|
+
import * as cloudflare from '@pulumi/cloudflare';
|
|
3
2
|
/**
|
|
4
3
|
* @classdesc Provides operations on Cloudflare Filters
|
|
5
4
|
* - A new instance of this class is injected into {@link CommonCloudflareConstruct} constructor.
|
|
@@ -12,7 +11,7 @@ import { createCloudflareTfOutput } from '../../utils/index.js';
|
|
|
12
11
|
* constructor(parent: Construct, id: string, props: CommonCloudflareStackProps) {
|
|
13
12
|
* super(parent, id, props)
|
|
14
13
|
* this.props = props
|
|
15
|
-
* this.filterManager.
|
|
14
|
+
* this.filterManager.createFilter('MyFilter', this, props)
|
|
16
15
|
* }
|
|
17
16
|
* }
|
|
18
17
|
* ```
|
|
@@ -23,20 +22,17 @@ export class CloudflareFilterManager {
|
|
|
23
22
|
* @param id scoped id of the resource
|
|
24
23
|
* @param scope scope in which this resource is defined
|
|
25
24
|
* @param props filter properties
|
|
26
|
-
* @see [
|
|
25
|
+
* @see [Pulumi Cloudflare Filter]{@link https://www.pulumi.com/registry/packages/cloudflare/api-docs/filter/}
|
|
27
26
|
*/
|
|
28
|
-
|
|
27
|
+
createFilter(id, scope, props) {
|
|
29
28
|
if (!props)
|
|
30
29
|
throw `Props undefined for ${id}`;
|
|
31
30
|
const zoneId = props.zoneId
|
|
32
31
|
? props.zoneId
|
|
33
|
-
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { name: scope.props.domainName })?.
|
|
34
|
-
|
|
32
|
+
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id;
|
|
33
|
+
return new cloudflare.Filter(`${id}`, {
|
|
35
34
|
...props,
|
|
36
35
|
zoneId,
|
|
37
36
|
});
|
|
38
|
-
createCloudflareTfOutput(`${id}-filterFriendlyUniqueId`, scope, filter.friendlyUniqueId);
|
|
39
|
-
createCloudflareTfOutput(`${id}-filterId`, scope, filter.id);
|
|
40
|
-
return filter;
|
|
41
37
|
}
|
|
42
38
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export interface FilterProps extends
|
|
1
|
+
import { FilterArgs } from '@pulumi/cloudflare';
|
|
2
|
+
export interface FilterProps extends FilterArgs {
|
|
3
3
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { FirewallRule } from '@cdktf/provider-cloudflare/lib/firewall-rule/index.js';
|
|
2
1
|
import { CommonCloudflareConstruct } from '../../common/index.js';
|
|
3
2
|
import { FirewallRuleProps } from './types.js';
|
|
4
3
|
/**
|
|
@@ -24,7 +23,7 @@ export declare class CloudflareFirewallManager {
|
|
|
24
23
|
* @param id scoped id of the resource
|
|
25
24
|
* @param scope scope in which this resource is defined
|
|
26
25
|
* @param props firewall rule properties
|
|
27
|
-
* @see [
|
|
26
|
+
* @see [Pulumi Cloudflare Firewall Rule]{@link https://www.pulumi.com/registry/packages/cloudflare/api-docs/firewallrule/}
|
|
28
27
|
*/
|
|
29
|
-
createFirewallRule(id: string, scope: CommonCloudflareConstruct, props: FirewallRuleProps): FirewallRule;
|
|
28
|
+
createFirewallRule(id: string, scope: CommonCloudflareConstruct, props: FirewallRuleProps): import("@pulumi/cloudflare/firewallRule.js").FirewallRule;
|
|
30
29
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { createCloudflareTfOutput } from '../../utils/index.js';
|
|
1
|
+
import * as cloudflare from '@pulumi/cloudflare';
|
|
3
2
|
/**
|
|
4
3
|
* @classdesc Provides operations on Cloudflare Firewall Rules
|
|
5
4
|
* - A new instance of this class is injected into {@link CommonCloudflareConstruct} constructor.
|
|
@@ -23,20 +22,17 @@ export class CloudflareFirewallManager {
|
|
|
23
22
|
* @param id scoped id of the resource
|
|
24
23
|
* @param scope scope in which this resource is defined
|
|
25
24
|
* @param props firewall rule properties
|
|
26
|
-
* @see [
|
|
25
|
+
* @see [Pulumi Cloudflare Firewall Rule]{@link https://www.pulumi.com/registry/packages/cloudflare/api-docs/firewallrule/}
|
|
27
26
|
*/
|
|
28
27
|
createFirewallRule(id, scope, props) {
|
|
29
28
|
if (!props)
|
|
30
29
|
throw `Props undefined for ${id}`;
|
|
31
30
|
const zoneId = props.zoneId
|
|
32
31
|
? props.zoneId
|
|
33
|
-
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { name: scope.props.domainName })?.
|
|
34
|
-
|
|
32
|
+
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id;
|
|
33
|
+
return new cloudflare.FirewallRule(`${id}`, {
|
|
35
34
|
...props,
|
|
36
35
|
zoneId,
|
|
37
36
|
});
|
|
38
|
-
createCloudflareTfOutput(`${id}-firewallRuleFriendlyUniqueId`, scope, firewallRule.friendlyUniqueId);
|
|
39
|
-
createCloudflareTfOutput(`${id}-firewallRuleId`, scope, firewallRule.id);
|
|
40
|
-
return firewallRule;
|
|
41
37
|
}
|
|
42
38
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export interface FirewallRuleProps extends
|
|
1
|
+
import { FirewallRuleArgs } from '@pulumi/cloudflare';
|
|
2
|
+
export interface FirewallRuleProps extends FirewallRuleArgs {
|
|
3
3
|
}
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import { PageRule } from '@cdktf/provider-cloudflare/lib/page-rule/index.js';
|
|
2
|
-
import { PagesDomain } from '@cdktf/provider-cloudflare/lib/pages-domain/index.js';
|
|
3
|
-
import { PagesProject } from '@cdktf/provider-cloudflare/lib/pages-project/index.js';
|
|
4
|
-
import { LocalExec } from 'cdktf-local-exec';
|
|
5
1
|
import { CommonCloudflareConstruct } from '../../common/index.js';
|
|
6
2
|
import { PageRuleProps, PagesDomainProps, PagesProjectDeployProps, PagesProjectProps } from './types.js';
|
|
7
3
|
/**
|
|
@@ -27,24 +23,24 @@ export declare class CloudflarePageManager {
|
|
|
27
23
|
* @param id scoped id of the resource
|
|
28
24
|
* @param scope scope in which this resource is defined
|
|
29
25
|
* @param props pages project properties
|
|
30
|
-
* @see [
|
|
26
|
+
* @see [Pulumi Cloudflare Pages Project]{@link https://www.pulumi.com/registry/packages/cloudflare/api-docs/pagesproject/}
|
|
31
27
|
*/
|
|
32
|
-
createPagesProject(id: string, scope: CommonCloudflareConstruct, props: PagesProjectProps): PagesProject;
|
|
28
|
+
createPagesProject(id: string, scope: CommonCloudflareConstruct, props: PagesProjectProps): import("@pulumi/cloudflare/pagesProject.js").PagesProject;
|
|
33
29
|
/**
|
|
34
30
|
* @summary Method to create a new Cloudflare Pages Domain
|
|
35
31
|
* @param id scoped id of the resource
|
|
36
32
|
* @param scope scope in which this resource is defined
|
|
37
33
|
* @param props pages domain properties
|
|
38
|
-
* @see [
|
|
34
|
+
* @see [Pulumi Cloudflare Pages Domain]{@link https://www.pulumi.com/registry/packages/cloudflare/api-docs/pagesdomain/}
|
|
39
35
|
*/
|
|
40
|
-
createPagesDomain(id: string, scope: CommonCloudflareConstruct, props: PagesDomainProps): PagesDomain;
|
|
36
|
+
createPagesDomain(id: string, scope: CommonCloudflareConstruct, props: PagesDomainProps): import("@pulumi/cloudflare/pagesDomain.js").PagesDomain;
|
|
41
37
|
/**
|
|
42
38
|
* @summary Method to create a new Cloudflare Page Rule
|
|
43
39
|
* @param id scoped id of the resource
|
|
44
40
|
* @param scope scope in which this resource is defined
|
|
45
41
|
* @param props page rule properties
|
|
46
|
-
* @see [
|
|
42
|
+
* @see [Pulumi Cloudflare Page Rule]{@link https://www.pulumi.com/registry/packages/cloudflare/api-docs/pagerule/}
|
|
47
43
|
*/
|
|
48
|
-
createPageRule(id: string, scope: CommonCloudflareConstruct, props: PageRuleProps): PageRule;
|
|
49
|
-
deployPagesProject(id: string, scope: CommonCloudflareConstruct, props: PagesProjectDeployProps):
|
|
44
|
+
createPageRule(id: string, scope: CommonCloudflareConstruct, props: PageRuleProps): import("@pulumi/cloudflare/pageRule.js").PageRule;
|
|
45
|
+
deployPagesProject(id: string, scope: CommonCloudflareConstruct, props: PagesProjectDeployProps): import("@pulumi/command/local/command.js").Command;
|
|
50
46
|
}
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import { PagesProject } from '@cdktf/provider-cloudflare/lib/pages-project/index.js';
|
|
4
|
-
import { LocalExec, Provider } from 'cdktf-local-exec';
|
|
5
|
-
import { createCloudflareTfOutput } from '../../utils/index.js';
|
|
1
|
+
import * as cloudflare from '@pulumi/cloudflare';
|
|
2
|
+
import { local } from '@pulumi/command';
|
|
6
3
|
/**
|
|
7
4
|
* @classdesc Provides operations on Cloudflare Pages
|
|
8
5
|
* - A new instance of this class is injected into {@link CommonCloudflareConstruct} constructor.
|
|
@@ -26,70 +23,60 @@ export class CloudflarePageManager {
|
|
|
26
23
|
* @param id scoped id of the resource
|
|
27
24
|
* @param scope scope in which this resource is defined
|
|
28
25
|
* @param props pages project properties
|
|
29
|
-
* @see [
|
|
26
|
+
* @see [Pulumi Cloudflare Pages Project]{@link https://www.pulumi.com/registry/packages/cloudflare/api-docs/pagesproject/}
|
|
30
27
|
*/
|
|
31
28
|
createPagesProject(id, scope, props) {
|
|
32
29
|
if (!props)
|
|
33
30
|
throw `Props undefined for ${id}`;
|
|
34
|
-
|
|
31
|
+
return new cloudflare.PagesProject(`${id}`, {
|
|
35
32
|
...props,
|
|
36
33
|
accountId: props.accountId ?? scope.props.accountId,
|
|
37
34
|
name: `${props.name}-${scope.props.stage}`,
|
|
38
35
|
});
|
|
39
|
-
createCloudflareTfOutput(`${id}-pagesProjectFriendlyUniqueId`, scope, pagesProject.friendlyUniqueId);
|
|
40
|
-
createCloudflareTfOutput(`${id}-pagesProjectId`, scope, pagesProject.id);
|
|
41
|
-
return pagesProject;
|
|
42
36
|
}
|
|
43
37
|
/**
|
|
44
38
|
* @summary Method to create a new Cloudflare Pages Domain
|
|
45
39
|
* @param id scoped id of the resource
|
|
46
40
|
* @param scope scope in which this resource is defined
|
|
47
41
|
* @param props pages domain properties
|
|
48
|
-
* @see [
|
|
42
|
+
* @see [Pulumi Cloudflare Pages Domain]{@link https://www.pulumi.com/registry/packages/cloudflare/api-docs/pagesdomain/}
|
|
49
43
|
*/
|
|
50
44
|
createPagesDomain(id, scope, props) {
|
|
51
45
|
if (!props)
|
|
52
46
|
throw `Props undefined for ${id}`;
|
|
53
|
-
|
|
47
|
+
return new cloudflare.PagesDomain(`${id}`, {
|
|
54
48
|
...props,
|
|
55
49
|
accountId: props.accountId ?? scope.props.accountId,
|
|
56
50
|
name: props.name ?? scope.props.domainName,
|
|
57
51
|
});
|
|
58
|
-
createCloudflareTfOutput(`${id}-pagesDomainFriendlyUniqueId`, scope, pagesDomain.friendlyUniqueId);
|
|
59
|
-
createCloudflareTfOutput(`${id}-pagesDomainId`, scope, pagesDomain.id);
|
|
60
|
-
return pagesDomain;
|
|
61
52
|
}
|
|
62
53
|
/**
|
|
63
54
|
* @summary Method to create a new Cloudflare Page Rule
|
|
64
55
|
* @param id scoped id of the resource
|
|
65
56
|
* @param scope scope in which this resource is defined
|
|
66
57
|
* @param props page rule properties
|
|
67
|
-
* @see [
|
|
58
|
+
* @see [Pulumi Cloudflare Page Rule]{@link https://www.pulumi.com/registry/packages/cloudflare/api-docs/pagerule/}
|
|
68
59
|
*/
|
|
69
60
|
createPageRule(id, scope, props) {
|
|
70
61
|
if (!props)
|
|
71
62
|
throw `Props undefined for ${id}`;
|
|
72
63
|
const zoneId = props.zoneId
|
|
73
64
|
? props.zoneId
|
|
74
|
-
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { name: scope.props.domainName })?.
|
|
75
|
-
|
|
65
|
+
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id;
|
|
66
|
+
return new cloudflare.PageRule(`${id}`, {
|
|
76
67
|
...props,
|
|
77
68
|
zoneId,
|
|
78
69
|
});
|
|
79
|
-
createCloudflareTfOutput(`${id}-pageRuleFriendlyUniqueId`, scope, pageRule.friendlyUniqueId);
|
|
80
|
-
createCloudflareTfOutput(`${id}-pageRuleId`, scope, pageRule.id);
|
|
81
|
-
return pageRule;
|
|
82
70
|
}
|
|
83
71
|
deployPagesProject(id, scope, props) {
|
|
84
72
|
if (!props)
|
|
85
73
|
throw `Props undefined for ${id}`;
|
|
86
|
-
new Provider(scope, `${id}`);
|
|
87
74
|
const message = process.env.BUILD_NUMBER ?? props.message;
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
75
|
+
return new local.Command(`${id}-deploy-${new Date().toISOString()}`, {
|
|
76
|
+
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}`,
|
|
77
|
+
dir: '',
|
|
78
|
+
}, {
|
|
91
79
|
dependsOn: props.dependsOn,
|
|
92
80
|
});
|
|
93
|
-
return deployment;
|
|
94
81
|
}
|
|
95
82
|
}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { PagesProjectConfig } from '@cdktf/provider-cloudflare/lib/pages-project/index.js';
|
|
4
|
-
export interface PagesProjectProps extends PagesProjectConfig {
|
|
1
|
+
import { PageRuleArgs, PagesDomainArgs, PagesProjectArgs } from '@pulumi/cloudflare';
|
|
2
|
+
export interface PagesProjectProps extends PagesProjectArgs {
|
|
5
3
|
}
|
|
6
|
-
export interface PagesDomainProps extends
|
|
4
|
+
export interface PagesDomainProps extends PagesDomainArgs {
|
|
7
5
|
}
|
|
8
|
-
export interface PageRuleProps extends
|
|
6
|
+
export interface PageRuleProps extends PageRuleArgs {
|
|
9
7
|
}
|
|
10
8
|
export interface PagesProjectDeployProps {
|
|
11
9
|
branch: string;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { DnsRecord } from '@cdktf/provider-cloudflare/lib/dns-record/index.js';
|
|
2
1
|
import { CommonCloudflareConstruct } from '../../common/index.js';
|
|
3
2
|
import { DnsRecordProps } from './types.js';
|
|
4
3
|
/**
|
|
@@ -24,7 +23,7 @@ export declare class CloudflareRecordManager {
|
|
|
24
23
|
* @param id scoped id of the resource
|
|
25
24
|
* @param scope scope in which this resource is defined
|
|
26
25
|
* @param props record properties
|
|
27
|
-
* @see [
|
|
26
|
+
* @see [Pulumi Cloudflare Record]{@link https://www.pulumi.com/registry/packages/cloudflare/api-docs/record/}
|
|
28
27
|
*/
|
|
29
|
-
createRecord(id: string, scope: CommonCloudflareConstruct, props: DnsRecordProps): DnsRecord;
|
|
28
|
+
createRecord(id: string, scope: CommonCloudflareConstruct, props: DnsRecordProps): import("@pulumi/cloudflare/dnsRecord.js").DnsRecord;
|
|
30
29
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { createCloudflareTfOutput } from '../../utils/index.js';
|
|
1
|
+
import * as cloudflare from '@pulumi/cloudflare';
|
|
3
2
|
/**
|
|
4
3
|
* @classdesc Provides operations on Cloudflare Records
|
|
5
4
|
* - A new instance of this class is injected into {@link CommonCloudflareConstruct} constructor.
|
|
@@ -23,20 +22,17 @@ export class CloudflareRecordManager {
|
|
|
23
22
|
* @param id scoped id of the resource
|
|
24
23
|
* @param scope scope in which this resource is defined
|
|
25
24
|
* @param props record properties
|
|
26
|
-
* @see [
|
|
25
|
+
* @see [Pulumi Cloudflare Record]{@link https://www.pulumi.com/registry/packages/cloudflare/api-docs/record/}
|
|
27
26
|
*/
|
|
28
27
|
createRecord(id, scope, props) {
|
|
29
28
|
if (!props)
|
|
30
29
|
throw `Props undefined for ${id}`;
|
|
31
30
|
const zoneId = props.zoneId
|
|
32
31
|
? props.zoneId
|
|
33
|
-
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { name: scope.props.domainName })?.
|
|
34
|
-
|
|
32
|
+
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id;
|
|
33
|
+
return new cloudflare.DnsRecord(id, {
|
|
35
34
|
...props,
|
|
36
35
|
zoneId,
|
|
37
36
|
});
|
|
38
|
-
createCloudflareTfOutput(`${id}-recordFriendlyUniqueId`, scope, record.friendlyUniqueId);
|
|
39
|
-
createCloudflareTfOutput(`${id}-recordId`, scope, record.id);
|
|
40
|
-
return record;
|
|
41
37
|
}
|
|
42
38
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export interface DnsRecordProps extends
|
|
1
|
+
import { DnsRecordArgs } from '@pulumi/cloudflare';
|
|
2
|
+
export interface DnsRecordProps extends DnsRecordArgs {
|
|
3
3
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Ruleset } from '@cdktf/provider-cloudflare/lib/ruleset/index.js';
|
|
2
1
|
import { CommonCloudflareConstruct } from '../../common/index.js';
|
|
3
2
|
import { RulesetProps } from './types.js';
|
|
4
3
|
/**
|
|
@@ -7,11 +6,11 @@ import { RulesetProps } from './types.js';
|
|
|
7
6
|
* - If a custom construct extends {@link CommonCloudflareConstruct}, an instance is available within the context.
|
|
8
7
|
* @example
|
|
9
8
|
* ```
|
|
10
|
-
* import { CommonCloudflareConstruct
|
|
9
|
+
* import { CommonCloudflareConstruct } from '@gradientedge/cdk-utils'
|
|
11
10
|
*
|
|
12
11
|
* class CustomConstruct extends CommonCloudflareConstruct {
|
|
13
|
-
* constructor(parent:
|
|
14
|
-
* super(parent,
|
|
12
|
+
* constructor(parent: pulumi.ComponentResource, name: string, props: CommonCloudflareStackProps) {
|
|
13
|
+
* super(parent, name, props)
|
|
15
14
|
* this.props = props
|
|
16
15
|
* this.ruleSetManager.createRuleSet('MyRule', this, props)
|
|
17
16
|
* }
|
|
@@ -24,7 +23,7 @@ export declare class CloudflareRuleSetManager {
|
|
|
24
23
|
* @param id scoped id of the resource
|
|
25
24
|
* @param scope scope in which this resource is defined
|
|
26
25
|
* @param props rule set properties
|
|
27
|
-
* @see [
|
|
26
|
+
* @see [Pulumi Cloudflare Ruleset]{@link https://www.pulumi.com/registry/packages/cloudflare/api-docs/ruleset/}
|
|
28
27
|
*/
|
|
29
|
-
createRuleSet(id: string, scope: CommonCloudflareConstruct, props: RulesetProps): Ruleset;
|
|
28
|
+
createRuleSet(id: string, scope: CommonCloudflareConstruct, props: RulesetProps): import("@pulumi/cloudflare/ruleset.js").Ruleset;
|
|
30
29
|
}
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { createCloudflareTfOutput } from '../../utils/index.js';
|
|
1
|
+
import * as cloudflare from '@pulumi/cloudflare';
|
|
3
2
|
/**
|
|
4
3
|
* @classdesc Provides operations on Cloudflare Rule Sets
|
|
5
4
|
* - A new instance of this class is injected into {@link CommonCloudflareConstruct} constructor.
|
|
6
5
|
* - If a custom construct extends {@link CommonCloudflareConstruct}, an instance is available within the context.
|
|
7
6
|
* @example
|
|
8
7
|
* ```
|
|
9
|
-
* import { CommonCloudflareConstruct
|
|
8
|
+
* import { CommonCloudflareConstruct } from '@gradientedge/cdk-utils'
|
|
10
9
|
*
|
|
11
10
|
* class CustomConstruct extends CommonCloudflareConstruct {
|
|
12
|
-
* constructor(parent:
|
|
13
|
-
* super(parent,
|
|
11
|
+
* constructor(parent: pulumi.ComponentResource, name: string, props: CommonCloudflareStackProps) {
|
|
12
|
+
* super(parent, name, props)
|
|
14
13
|
* this.props = props
|
|
15
14
|
* this.ruleSetManager.createRuleSet('MyRule', this, props)
|
|
16
15
|
* }
|
|
@@ -23,20 +22,18 @@ export class CloudflareRuleSetManager {
|
|
|
23
22
|
* @param id scoped id of the resource
|
|
24
23
|
* @param scope scope in which this resource is defined
|
|
25
24
|
* @param props rule set properties
|
|
26
|
-
* @see [
|
|
25
|
+
* @see [Pulumi Cloudflare Ruleset]{@link https://www.pulumi.com/registry/packages/cloudflare/api-docs/ruleset/}
|
|
27
26
|
*/
|
|
28
27
|
createRuleSet(id, scope, props) {
|
|
29
28
|
if (!props)
|
|
30
29
|
throw `Props undefined for ${id}`;
|
|
31
30
|
const zoneId = props.zoneId
|
|
32
31
|
? props.zoneId
|
|
33
|
-
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { name: scope.props.domainName })?.
|
|
34
|
-
const ruleSet = new Ruleset(
|
|
32
|
+
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id;
|
|
33
|
+
const ruleSet = new cloudflare.Ruleset(`${id}`, {
|
|
35
34
|
...props,
|
|
36
35
|
zoneId,
|
|
37
36
|
});
|
|
38
|
-
createCloudflareTfOutput(`${id}-ruleSetFriendlyUniqueId`, scope, ruleSet.friendlyUniqueId);
|
|
39
|
-
createCloudflareTfOutput(`${id}-ruleSetId`, scope, ruleSet.id);
|
|
40
37
|
return ruleSet;
|
|
41
38
|
}
|
|
42
39
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
export interface RulesetProps extends
|
|
1
|
+
import * as cloudflare from '@pulumi/cloudflare';
|
|
2
|
+
export interface RulesetProps extends cloudflare.RulesetArgs {
|
|
3
3
|
}
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
import { WorkersCronTrigger } from '@cdktf/provider-cloudflare/lib/workers-cron-trigger/index.js';
|
|
2
|
-
import { WorkersCustomDomain } from '@cdktf/provider-cloudflare/lib/workers-custom-domain/index.js';
|
|
3
|
-
import { WorkersKvNamespace } from '@cdktf/provider-cloudflare/lib/workers-kv-namespace/index.js';
|
|
4
|
-
import { WorkersKv } from '@cdktf/provider-cloudflare/lib/workers-kv/index.js';
|
|
5
|
-
import { WorkersRoute } from '@cdktf/provider-cloudflare/lib/workers-route/index.js';
|
|
6
|
-
import { WorkersScript } from '@cdktf/provider-cloudflare/lib/workers-script/index.js';
|
|
7
1
|
import { CommonCloudflareConstruct } from '../../common/index.js';
|
|
8
2
|
import { WorkerCronTriggerProps, WorkerDomainProps, WorkerRouteProps, WorkerScriptProps, WorkersKvNamespaceProps, WorkersKvProps } from './types.js';
|
|
9
3
|
/**
|
|
@@ -29,47 +23,47 @@ export declare class CloudflareWorkerManager {
|
|
|
29
23
|
* @param id scoped id of the resource
|
|
30
24
|
* @param scope scope in which this resource is defined
|
|
31
25
|
* @param props worker domain properties
|
|
32
|
-
* @see [
|
|
26
|
+
* @see [Pulumi Worker Domain]{@link https://www.pulumi.com/registry/packages/cloudflare/api-docs/workercustomdomain/}
|
|
33
27
|
*/
|
|
34
|
-
createWorkerDomain(id: string, scope: CommonCloudflareConstruct, props: WorkerDomainProps): WorkersCustomDomain;
|
|
28
|
+
createWorkerDomain(id: string, scope: CommonCloudflareConstruct, props: WorkerDomainProps): import("@pulumi/cloudflare/workersCustomDomain.js").WorkersCustomDomain;
|
|
35
29
|
/**
|
|
36
30
|
* @summary Method to create a new Cloudflare Worker Route
|
|
37
31
|
* @param id scoped id of the resource
|
|
38
32
|
* @param scope scope in which this resource is defined
|
|
39
33
|
* @param props worker route properties
|
|
40
|
-
* @see [
|
|
34
|
+
* @see [Pulumi Worker Route]{@link https://www.pulumi.com/registry/packages/cloudflare/api-docs/workerroute/}
|
|
41
35
|
*/
|
|
42
|
-
createWorkerRoute(id: string, scope: CommonCloudflareConstruct, props: WorkerRouteProps): WorkersRoute;
|
|
36
|
+
createWorkerRoute(id: string, scope: CommonCloudflareConstruct, props: WorkerRouteProps): import("@pulumi/cloudflare/workersRoute.js").WorkersRoute;
|
|
43
37
|
/**
|
|
44
38
|
* @summary Method to create a new Cloudflare Worker Script
|
|
45
39
|
* @param id scoped id of the resource
|
|
46
40
|
* @param scope scope in which this resource is defined
|
|
47
41
|
* @param props worker script properties
|
|
48
|
-
* @see [
|
|
42
|
+
* @see [Pulumi Worker Script]{@link https://www.pulumi.com/registry/packages/cloudflare/api-docs/workerscript/}
|
|
49
43
|
*/
|
|
50
|
-
createWorkerScript(id: string, scope: CommonCloudflareConstruct, props: WorkerScriptProps): WorkersScript;
|
|
44
|
+
createWorkerScript(id: string, scope: CommonCloudflareConstruct, props: WorkerScriptProps): import("@pulumi/cloudflare/workersScript.js").WorkersScript;
|
|
51
45
|
/**
|
|
52
46
|
* @summary Method to create a new Cloudflare Workers KV Namespace
|
|
53
47
|
* @param id scoped id of the resource
|
|
54
48
|
* @param scope scope in which this resource is defined
|
|
55
49
|
* @param props workers kv namespace properties
|
|
56
|
-
* @see [
|
|
50
|
+
* @see [Pulumi Workers KV Namespace]{@link https://www.pulumi.com/registry/packages/cloudflare/api-docs/workerskvnamespace/}
|
|
57
51
|
*/
|
|
58
|
-
createWorkersKvNamespace(id: string, scope: CommonCloudflareConstruct, props: WorkersKvNamespaceProps): WorkersKvNamespace;
|
|
52
|
+
createWorkersKvNamespace(id: string, scope: CommonCloudflareConstruct, props: WorkersKvNamespaceProps): import("@pulumi/cloudflare/workersKvNamespace.js").WorkersKvNamespace;
|
|
59
53
|
/**
|
|
60
54
|
* @summary Method to create a new Cloudflare Workers KV
|
|
61
55
|
* @param id scoped id of the resource
|
|
62
56
|
* @param scope scope in which this resource is defined
|
|
63
57
|
* @param props workers kv properties
|
|
64
|
-
* @see [
|
|
58
|
+
* @see [Pulumi Workers KV]{@link https://www.pulumi.com/registry/packages/cloudflare/api-docs/workerskv/}
|
|
65
59
|
*/
|
|
66
|
-
createWorkersKv(id: string, scope: CommonCloudflareConstruct, props: WorkersKvProps): WorkersKv;
|
|
60
|
+
createWorkersKv(id: string, scope: CommonCloudflareConstruct, props: WorkersKvProps): import("@pulumi/cloudflare/workersKv.js").WorkersKv;
|
|
67
61
|
/**
|
|
68
62
|
* @summary Method to create a new Cloudflare Worker Cron Trigger
|
|
69
63
|
* @param id scoped id of the resource
|
|
70
64
|
* @param scope scope in which this resource is defined
|
|
71
65
|
* @param props workers cron trigger properties
|
|
72
|
-
* @see [
|
|
66
|
+
* @see [Pulumi Workers Cron Trigger]{@link https://www.pulumi.com/registry/packages/cloudflare/api-docs/workercrontrigger/}
|
|
73
67
|
*/
|
|
74
|
-
createWorkerCronTrigger(id: string, scope: CommonCloudflareConstruct, props: WorkerCronTriggerProps): WorkersCronTrigger;
|
|
68
|
+
createWorkerCronTrigger(id: string, scope: CommonCloudflareConstruct, props: WorkerCronTriggerProps): import("@pulumi/cloudflare/workersCronTrigger.js").WorkersCronTrigger;
|
|
75
69
|
}
|