@gradientedge/cdk-utils 9.52.3 → 9.53.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/dist/src/lib/cloudflare/construct/pages-static-site/main.d.ts +7 -7
  2. package/dist/src/lib/cloudflare/construct/pages-static-site/main.js +9 -6
  3. package/dist/src/lib/cloudflare/construct/pages-static-site/types.d.ts +2 -2
  4. package/dist/src/lib/cloudflare/construct/worker-site/main.d.ts +5 -5
  5. package/dist/src/lib/cloudflare/construct/worker-site/main.js +8 -9
  6. package/dist/src/lib/cloudflare/construct/worker-site/types.d.ts +2 -2
  7. package/dist/src/lib/cloudflare/services/access/main.d.ts +34 -34
  8. package/dist/src/lib/cloudflare/services/access/main.js +42 -50
  9. package/dist/src/lib/cloudflare/services/access/types.d.ts +20 -20
  10. package/dist/src/lib/cloudflare/services/api-shield/main.js +1 -1
  11. package/dist/src/lib/cloudflare/services/argo/main.d.ts +13 -4
  12. package/dist/src/lib/cloudflare/services/argo/main.js +29 -7
  13. package/dist/src/lib/cloudflare/services/argo/types.d.ts +5 -2
  14. package/dist/src/lib/cloudflare/services/page/main.js +1 -1
  15. package/dist/src/lib/cloudflare/services/record/main.d.ts +4 -4
  16. package/dist/src/lib/cloudflare/services/record/main.js +3 -3
  17. package/dist/src/lib/cloudflare/services/record/types.d.ts +2 -2
  18. package/dist/src/lib/cloudflare/services/worker/main.d.ts +12 -12
  19. package/dist/src/lib/cloudflare/services/worker/main.js +14 -14
  20. package/dist/src/lib/cloudflare/services/worker/types.d.ts +8 -8
  21. package/dist/src/lib/cloudflare/services/zone/main.d.ts +15 -6
  22. package/dist/src/lib/cloudflare/services/zone/main.js +39 -15
  23. package/dist/src/lib/cloudflare/services/zone/types.d.ts +7 -3
  24. package/package.json +2 -2
  25. package/src/lib/cloudflare/construct/pages-static-site/main.ts +20 -13
  26. package/src/lib/cloudflare/construct/pages-static-site/types.ts +2 -2
  27. package/src/lib/cloudflare/construct/worker-site/main.ts +12 -19
  28. package/src/lib/cloudflare/construct/worker-site/types.ts +2 -8
  29. package/src/lib/cloudflare/services/access/main.ts +73 -72
  30. package/src/lib/cloudflare/services/access/types.ts +20 -20
  31. package/src/lib/cloudflare/services/api-shield/main.ts +1 -1
  32. package/src/lib/cloudflare/services/argo/main.ts +35 -8
  33. package/src/lib/cloudflare/services/argo/types.ts +4 -2
  34. package/src/lib/cloudflare/services/page/main.ts +1 -1
  35. package/src/lib/cloudflare/services/record/main.ts +5 -5
  36. package/src/lib/cloudflare/services/record/types.ts +2 -2
  37. package/src/lib/cloudflare/services/worker/main.ts +14 -14
  38. package/src/lib/cloudflare/services/worker/types.ts +8 -8
  39. package/src/lib/cloudflare/services/zone/main.ts +43 -16
  40. package/src/lib/cloudflare/services/zone/types.ts +6 -3
@@ -4,8 +4,12 @@ import { DataAzurermKeyVault } from '@cdktf/provider-azurerm/lib/data-azurerm-ke
4
4
  import { DataAzurermKeyVaultSecret } from '@cdktf/provider-azurerm/lib/data-azurerm-key-vault-secret'
5
5
  import { DataCloudflareZone } from '@cdktf/provider-cloudflare/lib/data-cloudflare-zone'
6
6
  import { PagesDomain } from '@cdktf/provider-cloudflare/lib/pages-domain'
7
- import { PagesProject } from '@cdktf/provider-cloudflare/lib/pages-project'
8
- import { Record } from '@cdktf/provider-cloudflare/lib/record'
7
+ import {
8
+ PagesProject,
9
+ PagesProjectDeploymentConfigsPreviewEnvVars,
10
+ PagesProjectDeploymentConfigsProductionEnvVars,
11
+ } from '@cdktf/provider-cloudflare/lib/pages-project'
12
+ import { DnsRecord } from '@cdktf/provider-cloudflare/lib/dns-record'
9
13
  import { Zone } from '@cdktf/provider-cloudflare/lib/zone'
10
14
  import { Fn } from 'cdktf'
11
15
  import { Construct } from 'constructs'
@@ -31,14 +35,14 @@ export class CloudflarePagesStaticSite extends CommonCloudflareConstruct {
31
35
  declare props: CloudflarePagesStaticSiteProps
32
36
 
33
37
  /* static site resources */
34
- sitePagesCnameRecord: Record
38
+ sitePagesCnameRecord: DnsRecord
35
39
  sitePagesDomain: PagesDomain
36
40
  sitePagesProject: PagesProject
37
41
  siteZone: DataCloudflareZone | Zone
38
- sitePagesEnvironmentVariables: { [key: string]: string }
39
- sitePagesPreviewEnvironmentVariables: { [key: string]: string }
40
- sitePagesSecrets: { [key: string]: string }
41
- sitePagesPreviewSecrets: { [key: string]: string }
42
+ sitePagesEnvironmentVariables: { [key: string]: PagesProjectDeploymentConfigsProductionEnvVars }
43
+ sitePagesPreviewEnvironmentVariables: { [key: string]: PagesProjectDeploymentConfigsPreviewEnvVars }
44
+ sitePagesSecrets: { [key: string]: PagesProjectDeploymentConfigsProductionEnvVars }
45
+ sitePagesPreviewSecrets: { [key: string]: PagesProjectDeploymentConfigsPreviewEnvVars }
42
46
  siteDeploymentDependsOn: any
43
47
 
44
48
  constructor(parent: Construct, id: string, props: CloudflarePagesStaticSiteProps) {
@@ -79,10 +83,10 @@ export class CloudflarePagesStaticSite extends CommonCloudflareConstruct {
79
83
  ...this.props.sitePagesProject,
80
84
  deploymentConfigs: {
81
85
  preview: {
82
- secrets: this.sitePagesPreviewSecrets,
86
+ envVars: this.sitePagesPreviewSecrets,
83
87
  },
84
88
  production: {
85
- secrets: this.sitePagesSecrets,
89
+ envVars: this.sitePagesSecrets,
86
90
  },
87
91
  },
88
92
  }
@@ -96,10 +100,10 @@ export class CloudflarePagesStaticSite extends CommonCloudflareConstruct {
96
100
  ...this.props.sitePagesProject,
97
101
  deploymentConfigs: {
98
102
  preview: {
99
- environmentVariables: this.sitePagesPreviewEnvironmentVariables,
103
+ envVars: this.sitePagesPreviewEnvironmentVariables,
100
104
  },
101
105
  production: {
102
- environmentVariables: this.sitePagesEnvironmentVariables,
106
+ envVars: this.sitePagesEnvironmentVariables,
103
107
  },
104
108
  },
105
109
  }
@@ -170,7 +174,7 @@ export class CloudflarePagesStaticSite extends CommonCloudflareConstruct {
170
174
  protected createDomain() {
171
175
  this.sitePagesDomain = this.pageManager.createPagesDomain(`${this.id}-site-domain`, this, {
172
176
  accountId: this.props.accountId,
173
- domain: `${this.props.siteSubDomain}.${this.props.domainName}`,
177
+ name: `${this.props.siteSubDomain}.${this.props.domainName}`,
174
178
  projectName: this.sitePagesProject.name,
175
179
  })
176
180
  }
@@ -182,7 +186,10 @@ export class CloudflarePagesStaticSite extends CommonCloudflareConstruct {
182
186
  this.sitePagesCnameRecord = this.recordManager.createRecord(`${this.id}-site-record`, this, {
183
187
  ...this.props.siteCnameRecord,
184
188
  name: this.props.siteSubDomain,
185
- value: `${this.sitePagesProject.name}.pages.dev`,
189
+ data: {
190
+ ...this.props.siteCnameRecord.data,
191
+ value: `${this.sitePagesProject.name}.pages.dev`,
192
+ },
186
193
  })
187
194
  }
188
195
 
@@ -1,10 +1,10 @@
1
1
  import { CommonCloudflareStackProps } from '../../common'
2
- import { PagesProjectProps, RecordProps, ZoneProps } from '../../services'
2
+ import { PagesProjectProps, DnsRecordProps, ZoneProps } from '../../services'
3
3
 
4
4
  export interface CloudflarePagesStaticSiteProps extends CommonCloudflareStackProps {
5
5
  siteAssetDir: string
6
6
  siteBranch?: string
7
- siteCnameRecord: RecordProps
7
+ siteCnameRecord: DnsRecordProps
8
8
  siteDeployMessage: string
9
9
  sitePagesProject: PagesProjectProps
10
10
  siteSubDomain: string
@@ -3,11 +3,7 @@ import { DataAwsSecretsmanagerSecretVersion } from '@cdktf/provider-aws/lib/data
3
3
  import { DataAzurermKeyVault } from '@cdktf/provider-azurerm/lib/data-azurerm-key-vault'
4
4
  import { DataAzurermKeyVaultSecret } from '@cdktf/provider-azurerm/lib/data-azurerm-key-vault-secret'
5
5
  import { DataCloudflareZone } from '@cdktf/provider-cloudflare/lib/data-cloudflare-zone'
6
- import {
7
- WorkerScript,
8
- WorkerScriptPlainTextBinding,
9
- WorkerScriptSecretTextBinding,
10
- } from '@cdktf/provider-cloudflare/lib/worker-script'
6
+ import { WorkersScript, WorkersScriptBindings } from '@cdktf/provider-cloudflare/lib/workers-script'
11
7
  import { Zone } from '@cdktf/provider-cloudflare/lib/zone'
12
8
  import { Fn, TerraformAsset, AssetType } from 'cdktf'
13
9
  import { Construct } from 'constructs'
@@ -34,9 +30,9 @@ export class CloudflareWorkerSite extends CommonCloudflareConstruct {
34
30
 
35
31
  /* worker site resources */
36
32
  siteZone: DataCloudflareZone | Zone
37
- siteWorkerScript: WorkerScript
38
- workerPlainTextBindingEnvironmentVariables: WorkerScriptPlainTextBinding[]
39
- workerSecretTextBindingEnvironmentVariables: WorkerScriptSecretTextBinding[]
33
+ siteWorkerScript: WorkersScript
34
+ workerPlainTextBindingEnvironmentVariables: WorkersScriptBindings[] = []
35
+ workerSecretTextBindingEnvironmentVariables: WorkersScriptBindings[] = []
40
36
 
41
37
  constructor(parent: Construct, id: string, props: CloudflareWorkerSiteProps) {
42
38
  super(parent, id, props)
@@ -53,7 +49,7 @@ export class CloudflareWorkerSite extends CommonCloudflareConstruct {
53
49
  this.createWorker()
54
50
  this.createWorkerDomain()
55
51
  this.createRuleset()
56
- this.createZoneSettingsOverride()
52
+ this.createZoneSetting()
57
53
  }
58
54
 
59
55
  /**
@@ -73,8 +69,9 @@ export class CloudflareWorkerSite extends CommonCloudflareConstruct {
73
69
  protected resolveEnvironmentVariables() {
74
70
  this.props.siteWorkerScript = {
75
71
  ...this.props.siteWorkerScript,
76
- plainTextBinding: this.workerPlainTextBindingEnvironmentVariables,
77
- secretTextBinding: this.workerSecretTextBindingEnvironmentVariables,
72
+ bindings: this.workerPlainTextBindingEnvironmentVariables.concat(
73
+ this.workerSecretTextBindingEnvironmentVariables
74
+ ),
78
75
  }
79
76
  }
80
77
 
@@ -100,7 +97,7 @@ export class CloudflareWorkerSite extends CommonCloudflareConstruct {
100
97
  this.workerManager.createWorkerDomain(`${this.id}-worker-domain`, this, {
101
98
  ...this.props.siteWorkerDomain,
102
99
  hostname: `${this.props.siteSubDomain}.${this.props.domainName}`,
103
- service: this.siteWorkerScript.name,
100
+ service: this.siteWorkerScript.scriptName,
104
101
  })
105
102
  }
106
103
 
@@ -168,12 +165,8 @@ export class CloudflareWorkerSite extends CommonCloudflareConstruct {
168
165
  /**
169
166
  * @summary Create zone settings override
170
167
  */
171
- protected createZoneSettingsOverride() {
172
- if (!this.props.siteZoneSettingsOverride) return
173
- this.zoneManager.createZoneSettingsOverride(
174
- `${this.id}-zone-settings-override`,
175
- this,
176
- this.props.siteZoneSettingsOverride
177
- )
168
+ protected createZoneSetting() {
169
+ if (!this.props.siteZoneSetting) return
170
+ this.zoneManager.createZoneSetting(`${this.id}-zone-setting`, this, this.props.siteZoneSetting)
178
171
  }
179
172
  }
@@ -1,11 +1,5 @@
1
1
  import { CommonCloudflareStackProps } from '../../common'
2
- import {
3
- WorkerDomainProps,
4
- WorkerScriptProps,
5
- RulesetProps,
6
- ZoneProps,
7
- ZoneSettingsOverrideProps,
8
- } from '../../services'
2
+ import { WorkerDomainProps, WorkerScriptProps, RulesetProps, ZoneProps, ZoneSettingProps } from '../../services'
9
3
 
10
4
  export interface CloudflareWorkerSiteProps extends CommonCloudflareStackProps {
11
5
  siteSubDomain: string
@@ -14,5 +8,5 @@ export interface CloudflareWorkerSiteProps extends CommonCloudflareStackProps {
14
8
  siteWorkerDomain: WorkerDomainProps
15
9
  siteWorkerAsset: string
16
10
  siteRuleSet: RulesetProps
17
- siteZoneSettingsOverride: ZoneSettingsOverrideProps
11
+ siteZoneSetting: ZoneSettingProps
18
12
  }
@@ -1,29 +1,29 @@
1
- import { AccessApplication } from '@cdktf/provider-cloudflare/lib/access-application'
2
- import { AccessCaCertificate } from '@cdktf/provider-cloudflare/lib/access-ca-certificate'
3
- import { AccessCustomPage } from '@cdktf/provider-cloudflare/lib/access-custom-page'
4
- import { AccessGroup } from '@cdktf/provider-cloudflare/lib/access-group'
5
- import { AccessIdentityProvider } from '@cdktf/provider-cloudflare/lib/access-identity-provider'
6
- import { AccessMutualTlsCertificate } from '@cdktf/provider-cloudflare/lib/access-mutual-tls-certificate'
1
+ import { ZeroTrustAccessApplication } from '@cdktf/provider-cloudflare/lib/zero-trust-access-application'
2
+ import { ZeroTrustAccessShortLivedCertificate } from '@cdktf/provider-cloudflare/lib/zero-trust-access-short-lived-certificate'
3
+ import { ZeroTrustAccessCustomPage } from '@cdktf/provider-cloudflare/lib/zero-trust-access-custom-page'
4
+ import { ZeroTrustAccessGroup } from '@cdktf/provider-cloudflare/lib/zero-trust-access-group'
5
+ import { ZeroTrustAccessIdentityProvider } from '@cdktf/provider-cloudflare/lib/zero-trust-access-identity-provider'
6
+ import { ZeroTrustAccessMtlsCertificate } from '@cdktf/provider-cloudflare/lib/zero-trust-access-mtls-certificate'
7
+ import { ZeroTrustOrganization } from '@cdktf/provider-cloudflare/lib/zero-trust-organization'
8
+ import { ZeroTrustAccessPolicy } from '@cdktf/provider-cloudflare/lib/zero-trust-access-policy'
9
+ import { AccessRule } from '@cdktf/provider-cloudflare/lib/access-rule'
10
+ import { ZeroTrustAccessServiceToken } from '@cdktf/provider-cloudflare/lib/zero-trust-access-service-token'
11
+ import { ZeroTrustAccessTag } from '@cdktf/provider-cloudflare/lib/zero-trust-access-tag'
7
12
  import { CommonCloudflareConstruct } from '../../common'
8
13
  import { createCloudflareTfOutput } from '../../utils'
9
14
  import {
10
- AccessApplicationProps,
11
- AccessCaCertificateProps,
12
- AccessCustomPageProps,
13
- AccessGroupProps,
14
- AccessIdentityProviderProps,
15
- AccessMutualTlsCertificateProps,
16
- AccessOrganizationProps,
17
- AccessPolicyProps,
15
+ ZeroTrustAccessApplicationProps,
16
+ ZeroTrustAccessShortLivedCertificateProps,
17
+ ZeroTrustAccessCustomPageProps,
18
+ ZeroTrustAccessGroupProps,
19
+ ZeroTrustAccessIdentityProviderProps,
20
+ ZeroTrustAccessMtlsCertificateProps,
21
+ ZeroTrustOrganizationProps,
22
+ ZeroTrustAccessPolicyProps,
18
23
  AccessRuleProps,
19
- AccessServiceTokenProps,
20
- AccessTagProps,
24
+ ZeroTrustAccessServiceTokenProps,
25
+ ZeroTrustAccessTagProps,
21
26
  } from './types'
22
- import { AccessOrganization } from '@cdktf/provider-cloudflare/lib/access-organization'
23
- import { AccessPolicy } from '@cdktf/provider-cloudflare/lib/access-policy'
24
- import { AccessRule } from '@cdktf/provider-cloudflare/lib/access-rule'
25
- import { AccessServiceToken } from '@cdktf/provider-cloudflare/lib/access-service-token'
26
- import { AccessTag } from '@cdktf/provider-cloudflare/lib/access-tag'
27
27
 
28
28
  /**
29
29
  * @classdesc Provides operations on Cloudflare Access
@@ -48,16 +48,16 @@ export class CloudflareAccessManager {
48
48
  * @param id scoped id of the resource
49
49
  * @param scope scope in which this resource is defined
50
50
  * @param props access application properties
51
- * @see [CDKTF Access Application Module]{@link https://github.com/cdktf/cdktf-provider-cloudflare/blob/main/docs/accessApplication.typescript.md}
51
+ * @see [CDKTF Access Application Module]{@link https://github.com/cdktf/cdktf-provider-cloudflare/blob/main/docs/zeroTrustAccessApplication.typescript.md}
52
52
  */
53
- public createAccessApplication(id: string, scope: CommonCloudflareConstruct, props: AccessApplicationProps) {
53
+ public createAccessApplication(id: string, scope: CommonCloudflareConstruct, props: ZeroTrustAccessApplicationProps) {
54
54
  if (!props) throw `Props undefined for ${id}`
55
55
 
56
56
  const zoneId = props.zoneId
57
57
  ? props.zoneId
58
58
  : scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { name: scope.props.domainName })?.id
59
59
 
60
- const accessApplication = new AccessApplication(scope, `${id}`, {
60
+ const accessApplication = new ZeroTrustAccessApplication(scope, `${id}`, {
61
61
  ...props,
62
62
  domain: `${props.domain}-${scope.props.domainName}`,
63
63
  name: `${props.name}-${scope.props.stage}`,
@@ -71,28 +71,36 @@ export class CloudflareAccessManager {
71
71
  }
72
72
 
73
73
  /**
74
- * @summary Method to create a new Cloudflare Application Access CA Certificate
74
+ * @summary Method to create a new Cloudflare Application Access Short Lived Certificate
75
75
  * @param id scoped id of the resource
76
76
  * @param scope scope in which this resource is defined
77
- * @param props access ca certificate properties
78
- * @see [CDKTF Access Ca Certificate Module]{@link https://github.com/cdktf/cdktf-provider-cloudflare/blob/main/docs/accessCaCertificate.typescript.md}
77
+ * @param props access short lived certificate properties
78
+ * @see [CDKTF Access Short Lived Certificate Module]{@link https://github.com/cdktf/cdktf-provider-cloudflare/blob/main/docs/zeroTrustAccessShortLivedCertificate.typescript.md}
79
79
  */
80
- public createAccessCaCertificate(id: string, scope: CommonCloudflareConstruct, props: AccessCaCertificateProps) {
80
+ public createAccessShortLivedCertificate(
81
+ id: string,
82
+ scope: CommonCloudflareConstruct,
83
+ props: ZeroTrustAccessShortLivedCertificateProps
84
+ ) {
81
85
  if (!props) throw `Props undefined for ${id}`
82
86
 
83
87
  const zoneId = props.zoneId
84
88
  ? props.zoneId
85
89
  : scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { name: scope.props.domainName })?.id
86
90
 
87
- const accessCaCertificate = new AccessCaCertificate(scope, `${id}`, {
91
+ const accessShortLivedCertificate = new ZeroTrustAccessShortLivedCertificate(scope, `${id}`, {
88
92
  ...props,
89
93
  zoneId,
90
94
  })
91
95
 
92
- createCloudflareTfOutput(`${id}-accessCaCertificateFriendlyUniqueId`, scope, accessCaCertificate.friendlyUniqueId)
93
- createCloudflareTfOutput(`${id}-accessCaCertificateId`, scope, accessCaCertificate.id)
96
+ createCloudflareTfOutput(
97
+ `${id}-accessShortLivedCertificateFriendlyUniqueId`,
98
+ scope,
99
+ accessShortLivedCertificate.friendlyUniqueId
100
+ )
101
+ createCloudflareTfOutput(`${id}-accessShortLivedCertificateId`, scope, accessShortLivedCertificate.id)
94
102
 
95
- return accessCaCertificate
103
+ return accessShortLivedCertificate
96
104
  }
97
105
 
98
106
  /**
@@ -100,19 +108,15 @@ export class CloudflareAccessManager {
100
108
  * @param id scoped id of the resource
101
109
  * @param scope scope in which this resource is defined
102
110
  * @param props access custom page properties
103
- * @see [CDKTF Access Custom Page Module]{@link https://github.com/cdktf/cdktf-provider-cloudflare/blob/main/docs/accessCustomPage.typescript.md}
111
+ * @see [CDKTF Access Custom Page Module]{@link https://github.com/cdktf/cdktf-provider-cloudflare/blob/main/docs/zeroTrustAccessCustomPage.typescript.md}
104
112
  */
105
- public createAccessCustomPage(id: string, scope: CommonCloudflareConstruct, props: AccessCustomPageProps) {
113
+ public createAccessCustomPage(id: string, scope: CommonCloudflareConstruct, props: ZeroTrustAccessCustomPageProps) {
106
114
  if (!props) throw `Props undefined for ${id}`
107
115
 
108
- const zoneId = props.zoneId
109
- ? props.zoneId
110
- : scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { name: scope.props.domainName })?.id
111
-
112
- const accessCustomPage = new AccessCustomPage(scope, `${id}`, {
116
+ const accessCustomPage = new ZeroTrustAccessCustomPage(scope, `${id}`, {
113
117
  ...props,
118
+ accountId: props.accountId ?? scope.props.accountId,
114
119
  name: `${props.name}-${scope.props.stage}`,
115
- zoneId,
116
120
  })
117
121
 
118
122
  createCloudflareTfOutput(`${id}-accessCustomPageFriendlyUniqueId`, scope, accessCustomPage.friendlyUniqueId)
@@ -126,16 +130,16 @@ export class CloudflareAccessManager {
126
130
  * @param id scoped id of the resource
127
131
  * @param scope scope in which this resource is defined
128
132
  * @param props access group properties
129
- * @see [CDKTF Access Group Module]{@link https://github.com/cdktf/cdktf-provider-cloudflare/blob/main/docs/accessGroup.typescript.md}
133
+ * @see [CDKTF Access Group Module]{@link https://github.com/cdktf/cdktf-provider-cloudflare/blob/main/docs/zeroTrustAccessGroup.typescript.md}
130
134
  */
131
- public createAccessGroup(id: string, scope: CommonCloudflareConstruct, props: AccessGroupProps) {
135
+ public createAccessGroup(id: string, scope: CommonCloudflareConstruct, props: ZeroTrustAccessGroupProps) {
132
136
  if (!props) throw `Props undefined for ${id}`
133
137
 
134
138
  const zoneId = props.zoneId
135
139
  ? props.zoneId
136
140
  : scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { name: scope.props.domainName })?.id
137
141
 
138
- const accessGroup = new AccessGroup(scope, `${id}`, {
142
+ const accessGroup = new ZeroTrustAccessGroup(scope, `${id}`, {
139
143
  ...props,
140
144
  name: `${props.name}-${scope.props.stage}`,
141
145
  zoneId,
@@ -152,12 +156,12 @@ export class CloudflareAccessManager {
152
156
  * @param id scoped id of the resource
153
157
  * @param scope scope in which this resource is defined
154
158
  * @param props access identity provider properties
155
- * @see [CDKTF Access Identity Provider Module]{@link https://github.com/cdktf/cdktf-provider-cloudflare/blob/main/docs/accessIdentityProvider.typescript.md}
159
+ * @see [CDKTF Access Identity Provider Module]{@link https://github.com/cdktf/cdktf-provider-cloudflare/blob/main/docs/zeroTrustAccessIdentityProvider.typescript.md}
156
160
  */
157
161
  public createAccessIdentityProvider(
158
162
  id: string,
159
163
  scope: CommonCloudflareConstruct,
160
- props: AccessIdentityProviderProps
164
+ props: ZeroTrustAccessIdentityProviderProps
161
165
  ) {
162
166
  if (!props) throw `Props undefined for ${id}`
163
167
 
@@ -165,7 +169,7 @@ export class CloudflareAccessManager {
165
169
  ? props.zoneId
166
170
  : scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { name: scope.props.domainName })?.id
167
171
 
168
- const accessIdentityProvider = new AccessIdentityProvider(scope, `${id}`, {
172
+ const accessIdentityProvider = new ZeroTrustAccessIdentityProvider(scope, `${id}`, {
169
173
  ...props,
170
174
  name: `${props.name}-${scope.props.stage}`,
171
175
  zoneId,
@@ -186,12 +190,12 @@ export class CloudflareAccessManager {
186
190
  * @param id scoped id of the resource
187
191
  * @param scope scope in which this resource is defined
188
192
  * @param props access mutual tls certificate properties
189
- * @see [CDKTF Access Mutual Tls Certificate Module]{@link https://github.com/cdktf/cdktf-provider-cloudflare/blob/main/docs/accessMutualTlsCertificate.typescript.md}
193
+ * @see [CDKTF Access Mutual Tls Certificate Module]{@link https://github.com/cdktf/cdktf-provider-cloudflare/blob/main/docs/zeroTrustAccessMtlsCertificate.typescript.md}
190
194
  */
191
195
  public createAccessMutualTlsCertificate(
192
196
  id: string,
193
197
  scope: CommonCloudflareConstruct,
194
- props: AccessMutualTlsCertificateProps
198
+ props: ZeroTrustAccessMtlsCertificateProps
195
199
  ) {
196
200
  if (!props) throw `Props undefined for ${id}`
197
201
 
@@ -199,7 +203,7 @@ export class CloudflareAccessManager {
199
203
  ? props.zoneId
200
204
  : scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { name: scope.props.domainName })?.id
201
205
 
202
- const accessMutualTlsCertificate = new AccessMutualTlsCertificate(scope, `${id}`, {
206
+ const accessMutualTlsCertificate = new ZeroTrustAccessMtlsCertificate(scope, `${id}`, {
203
207
  ...props,
204
208
  name: `${props.name}-${scope.props.stage}`,
205
209
  zoneId,
@@ -220,23 +224,22 @@ export class CloudflareAccessManager {
220
224
  * @param id scoped id of the resource
221
225
  * @param scope scope in which this resource is defined
222
226
  * @param props access organisation properties
223
- * @see [CDKTF Access Organisation Module]{@link https://github.com/cdktf/cdktf-provider-cloudflare/blob/main/docs/accessOrganization.typescript.md}
227
+ * @see [CDKTF Access Organisation Module]{@link https://github.com/cdktf/cdktf-provider-cloudflare/blob/main/docs/zeroTrustAccessOrganization.typescript.md}
224
228
  */
225
- public createAccessOrganization(id: string, scope: CommonCloudflareConstruct, props: AccessOrganizationProps) {
229
+ public createAccessOrganization(id: string, scope: CommonCloudflareConstruct, props: ZeroTrustOrganizationProps) {
226
230
  if (!props) throw `Props undefined for ${id}`
227
231
 
228
232
  const zoneId = props.zoneId
229
233
  ? props.zoneId
230
234
  : scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { name: scope.props.domainName })?.id
231
235
 
232
- const accessOrganization = new AccessOrganization(scope, `${id}`, {
236
+ const accessOrganization = new ZeroTrustOrganization(scope, `${id}`, {
233
237
  ...props,
234
238
  name: `${props.name}-${scope.props.stage}`,
235
239
  zoneId,
236
240
  })
237
241
 
238
242
  createCloudflareTfOutput(`${id}-accessOrganizationFriendlyUniqueId`, scope, accessOrganization.friendlyUniqueId)
239
- createCloudflareTfOutput(`${id}-accessOrganizationId`, scope, accessOrganization.id)
240
243
 
241
244
  return accessOrganization
242
245
  }
@@ -246,19 +249,15 @@ export class CloudflareAccessManager {
246
249
  * @param id scoped id of the resource
247
250
  * @param scope scope in which this resource is defined
248
251
  * @param props access policy properties
249
- * @see [CDKTF Access Policy Module]{@link https://github.com/cdktf/cdktf-provider-cloudflare/blob/main/docs/accessPolicy.typescript.md}
252
+ * @see [CDKTF Access Policy Module]{@link https://github.com/cdktf/cdktf-provider-cloudflare/blob/main/docs/zeroTrustAccessPolicy.typescript.md}
250
253
  */
251
- public createAccessPolicy(id: string, scope: CommonCloudflareConstruct, props: AccessPolicyProps) {
254
+ public createAccessPolicy(id: string, scope: CommonCloudflareConstruct, props: ZeroTrustAccessPolicyProps) {
252
255
  if (!props) throw `Props undefined for ${id}`
253
256
 
254
- const zoneId = props.zoneId
255
- ? props.zoneId
256
- : scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { name: scope.props.domainName })?.id
257
-
258
- const accessPolicy = new AccessPolicy(scope, `${id}`, {
257
+ const accessPolicy = new ZeroTrustAccessPolicy(scope, `${id}`, {
259
258
  ...props,
260
259
  name: `${props.name}-${scope.props.stage}`,
261
- zoneId,
260
+ accountId: props.accountId ?? scope.props.accountId,
262
261
  })
263
262
 
264
263
  createCloudflareTfOutput(`${id}-accessPolicyFriendlyUniqueId`, scope, accessPolicy.friendlyUniqueId)
@@ -284,6 +283,7 @@ export class CloudflareAccessManager {
284
283
  const accessRule = new AccessRule(scope, `${id}`, {
285
284
  ...props,
286
285
  zoneId,
286
+ accountId: props.accountId ?? scope.props.accountId,
287
287
  })
288
288
 
289
289
  createCloudflareTfOutput(`${id}-accessRuleFriendlyUniqueId`, scope, accessRule.friendlyUniqueId)
@@ -297,18 +297,23 @@ export class CloudflareAccessManager {
297
297
  * @param id scoped id of the resource
298
298
  * @param scope scope in which this resource is defined
299
299
  * @param props access service token properties
300
- * @see [CDKTF Access Service Token Module]{@link https://github.com/cdktf/cdktf-provider-cloudflare/blob/main/docs/accessServiceToken.typescript.md}
300
+ * @see [CDKTF Access Service Token Module]{@link https://github.com/cdktf/cdktf-provider-cloudflare/blob/main/docs/zeroTrustAccessServiceToken.typescript.md}
301
301
  */
302
- public createAccessServiceToken(id: string, scope: CommonCloudflareConstruct, props: AccessServiceTokenProps) {
302
+ public createAccessServiceToken(
303
+ id: string,
304
+ scope: CommonCloudflareConstruct,
305
+ props: ZeroTrustAccessServiceTokenProps
306
+ ) {
303
307
  if (!props) throw `Props undefined for ${id}`
304
308
 
305
309
  const zoneId = props.zoneId
306
310
  ? props.zoneId
307
311
  : scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { name: scope.props.domainName })?.id
308
312
 
309
- const accessServiceToken = new AccessServiceToken(scope, `${id}`, {
313
+ const accessServiceToken = new ZeroTrustAccessServiceToken(scope, `${id}`, {
310
314
  ...props,
311
315
  name: `${props.name}-${scope.props.stage}`,
316
+ accountId: props.accountId ?? scope.props.accountId,
312
317
  zoneId,
313
318
  })
314
319
 
@@ -323,19 +328,15 @@ export class CloudflareAccessManager {
323
328
  * @param id scoped id of the resource
324
329
  * @param scope scope in which this resource is defined
325
330
  * @param props access tag properties
326
- * @see [CDKTF Access Tag Token Module]{@link https://github.com/cdktf/cdktf-provider-cloudflare/blob/main/docs/accessTag.typescript.md}
331
+ * @see [CDKTF Access Tag Token Module]{@link https://github.com/cdktf/cdktf-provider-cloudflare/blob/main/docs/zeroTrustAccessTag.typescript.md}
327
332
  */
328
- public createAccessTag(id: string, scope: CommonCloudflareConstruct, props: AccessTagProps) {
333
+ public createAccessTag(id: string, scope: CommonCloudflareConstruct, props: ZeroTrustAccessTagProps) {
329
334
  if (!props) throw `Props undefined for ${id}`
330
335
 
331
- const zoneId = props.zoneId
332
- ? props.zoneId
333
- : scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { name: scope.props.domainName })?.id
334
-
335
- const accessTag = new AccessTag(scope, `${id}`, {
336
+ const accessTag = new ZeroTrustAccessTag(scope, `${id}`, {
336
337
  ...props,
337
338
  name: `${props.name}-${scope.props.stage}`,
338
- zoneId,
339
+ accountId: props.accountId ?? scope.props.accountId,
339
340
  })
340
341
 
341
342
  createCloudflareTfOutput(`${id}-accessTagFriendlyUniqueId`, scope, accessTag.friendlyUniqueId)
@@ -1,23 +1,23 @@
1
- import { AccessApplicationConfig } from '@cdktf/provider-cloudflare/lib/access-application'
2
- import { AccessCaCertificateConfig } from '@cdktf/provider-cloudflare/lib/access-ca-certificate'
3
- import { AccessCustomPageConfig } from '@cdktf/provider-cloudflare/lib/access-custom-page'
4
- import { AccessGroupConfig } from '@cdktf/provider-cloudflare/lib/access-group'
5
- import { AccessIdentityProviderConfig } from '@cdktf/provider-cloudflare/lib/access-identity-provider'
6
- import { AccessMutualTlsCertificateConfig } from '@cdktf/provider-cloudflare/lib/access-mutual-tls-certificate'
7
- import { AccessOrganizationConfig } from '@cdktf/provider-cloudflare/lib/access-organization'
8
- import { AccessPolicyConfig } from '@cdktf/provider-cloudflare/lib/access-policy'
1
+ import { ZeroTrustAccessApplicationConfig } from '@cdktf/provider-cloudflare/lib/zero-trust-access-application'
2
+ import { ZeroTrustAccessShortLivedCertificateConfig } from '@cdktf/provider-cloudflare/lib/zero-trust-access-short-lived-certificate'
3
+ import { ZeroTrustAccessCustomPageConfig } from '@cdktf/provider-cloudflare/lib/zero-trust-access-custom-page'
4
+ import { ZeroTrustAccessGroupConfig } from '@cdktf/provider-cloudflare/lib/zero-trust-access-group'
5
+ import { ZeroTrustAccessIdentityProviderConfig } from '@cdktf/provider-cloudflare/lib/zero-trust-access-identity-provider'
6
+ import { ZeroTrustAccessMtlsCertificateConfig } from '@cdktf/provider-cloudflare/lib/zero-trust-access-mtls-certificate'
7
+ import { ZeroTrustOrganizationConfig } from '@cdktf/provider-cloudflare/lib/zero-trust-organization'
8
+ import { ZeroTrustAccessPolicyConfig } from '@cdktf/provider-cloudflare/lib/zero-trust-access-policy'
9
9
  import { AccessRuleConfig } from '@cdktf/provider-cloudflare/lib/access-rule'
10
- import { AccessServiceTokenConfig } from '@cdktf/provider-cloudflare/lib/access-service-token'
11
- import { AccessTagConfig } from '@cdktf/provider-cloudflare/lib/access-tag'
10
+ import { ZeroTrustAccessServiceTokenConfig } from '@cdktf/provider-cloudflare/lib/zero-trust-access-service-token'
11
+ import { ZeroTrustAccessTagConfig } from '@cdktf/provider-cloudflare/lib/zero-trust-access-tag'
12
12
 
13
- export interface AccessApplicationProps extends AccessApplicationConfig {}
14
- export interface AccessCaCertificateProps extends AccessCaCertificateConfig {}
15
- export interface AccessCustomPageProps extends AccessCustomPageConfig {}
16
- export interface AccessGroupProps extends AccessGroupConfig {}
17
- export interface AccessIdentityProviderProps extends AccessIdentityProviderConfig {}
18
- export interface AccessMutualTlsCertificateProps extends AccessMutualTlsCertificateConfig {}
19
- export interface AccessOrganizationProps extends AccessOrganizationConfig {}
20
- export interface AccessPolicyProps extends AccessPolicyConfig {}
13
+ export interface ZeroTrustAccessApplicationProps extends ZeroTrustAccessApplicationConfig {}
14
+ export interface ZeroTrustAccessShortLivedCertificateProps extends ZeroTrustAccessShortLivedCertificateConfig {}
15
+ export interface ZeroTrustAccessCustomPageProps extends ZeroTrustAccessCustomPageConfig {}
16
+ export interface ZeroTrustAccessGroupProps extends ZeroTrustAccessGroupConfig {}
17
+ export interface ZeroTrustAccessIdentityProviderProps extends ZeroTrustAccessIdentityProviderConfig {}
18
+ export interface ZeroTrustAccessMtlsCertificateProps extends ZeroTrustAccessMtlsCertificateConfig {}
19
+ export interface ZeroTrustOrganizationProps extends ZeroTrustOrganizationConfig {}
20
+ export interface ZeroTrustAccessPolicyProps extends ZeroTrustAccessPolicyConfig {}
21
21
  export interface AccessRuleProps extends AccessRuleConfig {}
22
- export interface AccessServiceTokenProps extends AccessServiceTokenConfig {}
23
- export interface AccessTagProps extends AccessTagConfig {}
22
+ export interface ZeroTrustAccessServiceTokenProps extends ZeroTrustAccessServiceTokenConfig {}
23
+ export interface ZeroTrustAccessTagProps extends ZeroTrustAccessTagConfig {}
@@ -77,7 +77,7 @@ export class CloudflareApiShieldManager {
77
77
  })
78
78
 
79
79
  createCloudflareTfOutput(`${id}-apiShieldSchemaFriendlyUniqueId`, scope, apiShieldSchema.friendlyUniqueId)
80
- createCloudflareTfOutput(`${id}-apiShieldSchemaId`, scope, apiShieldSchema.id)
80
+ createCloudflareTfOutput(`${id}-apiShieldSchemaId`, scope, apiShieldSchema.schemaId)
81
81
 
82
82
  return apiShieldSchema
83
83
  }
@@ -1,7 +1,9 @@
1
- import { Argo } from '@cdktf/provider-cloudflare/lib/argo'
1
+ import { ArgoSmartRouting } from '@cdktf/provider-cloudflare/lib/argo-smart-routing'
2
+ import { ArgoTieredCaching } from '@cdktf/provider-cloudflare/lib/argo-tiered-caching'
2
3
  import { CommonCloudflareConstruct } from '../../common'
3
4
  import { createCloudflareTfOutput } from '../../utils'
4
- import { ArgoProps } from './types'
5
+ import { ArgoSmartRoutingProps, ArgoTieredCachingProps } from './types'
6
+ import { argoTieredCaching } from '@cdktf/provider-cloudflare'
5
7
 
6
8
  /**
7
9
  * @classdesc Provides operations on Cloudflare Argo
@@ -26,23 +28,48 @@ export class CloudflareArgoManager {
26
28
  * @param id scoped id of the resource
27
29
  * @param scope scope in which this resource is defined
28
30
  * @param props argo properties
29
- * @see [CDKTF Argo Module]{@link https://github.com/cdktf/cdktf-provider-cloudflare/blob/main/docs/argo.typescript.md}
31
+ * @see [CDKTF Argo Module]{@link https://github.com/cdktf/cdktf-provider-cloudflare/blob/main/docs/argoSmartRouting.typescript.md}
30
32
  */
31
- public createArgo(id: string, scope: CommonCloudflareConstruct, props: ArgoProps) {
33
+ public createArgoSmartRouting(id: string, scope: CommonCloudflareConstruct, props: ArgoSmartRoutingProps) {
32
34
  if (!props) throw `Props undefined for ${id}`
33
35
 
34
36
  const zoneId = props.zoneId
35
37
  ? props.zoneId
36
38
  : scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { name: scope.props.domainName })?.id
37
39
 
38
- const argo = new Argo(scope, `${id}`, {
40
+ const argoSmartRouting = new ArgoSmartRouting(scope, `${id}`, {
39
41
  ...props,
40
42
  zoneId,
41
43
  })
42
44
 
43
- createCloudflareTfOutput(`${id}-argoFriendlyUniqueId`, scope, argo.friendlyUniqueId)
44
- createCloudflareTfOutput(`${id}-argoId`, scope, argo.id)
45
+ createCloudflareTfOutput(`${id}-argoSmartRoutingFriendlyUniqueId`, scope, argoSmartRouting.friendlyUniqueId)
46
+ createCloudflareTfOutput(`${id}-argoSmartRoutingId`, scope, argoSmartRouting.id)
45
47
 
46
- return argo
48
+ return argoSmartRouting
49
+ }
50
+
51
+ /**
52
+ * @summary Method to create a new Cloudflare Argo
53
+ * @param id scoped id of the resource
54
+ * @param scope scope in which this resource is defined
55
+ * @param props argo properties
56
+ * @see [CDKTF Argo Module]{@link https://github.com/cdktf/cdktf-provider-cloudflare/blob/main/docs/argoTieredCaching.typescript.md}
57
+ */
58
+ public createArgoTieredCaching(id: string, scope: CommonCloudflareConstruct, props: ArgoTieredCachingProps) {
59
+ if (!props) throw `Props undefined for ${id}`
60
+
61
+ const zoneId = props.zoneId
62
+ ? props.zoneId
63
+ : scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { name: scope.props.domainName })?.id
64
+
65
+ const argoTieredCaching = new ArgoTieredCaching(scope, `${id}`, {
66
+ ...props,
67
+ zoneId,
68
+ })
69
+
70
+ createCloudflareTfOutput(`${id}-argoTieredCachingFriendlyUniqueId`, scope, argoTieredCaching.friendlyUniqueId)
71
+ createCloudflareTfOutput(`${id}-argoTieredCachingId`, scope, argoTieredCaching.id)
72
+
73
+ return argoTieredCaching
47
74
  }
48
75
  }
@@ -1,3 +1,5 @@
1
- import { ArgoConfig } from '@cdktf/provider-cloudflare/lib/argo'
1
+ import { ArgoSmartRoutingConfig } from '@cdktf/provider-cloudflare/lib/argo-smart-routing'
2
+ import { ArgoTieredCachingConfig } from '@cdktf/provider-cloudflare/lib/argo-tiered-caching'
2
3
 
3
- export interface ArgoProps extends ArgoConfig {}
4
+ export interface ArgoSmartRoutingProps extends ArgoSmartRoutingConfig {}
5
+ export interface ArgoTieredCachingProps extends ArgoTieredCachingConfig {}
@@ -59,7 +59,7 @@ export class CloudflarePageManager {
59
59
  const pagesDomain = new PagesDomain(scope, `${id}`, {
60
60
  ...props,
61
61
  accountId: props.accountId ?? scope.props.accountId,
62
- domain: props.domain ?? scope.props.domainName,
62
+ name: props.name ?? scope.props.domainName,
63
63
  })
64
64
 
65
65
  createCloudflareTfOutput(`${id}-pagesDomainFriendlyUniqueId`, scope, pagesDomain.friendlyUniqueId)