@gradientedge/cdk-utils 8.94.0 → 8.95.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.
|
@@ -71,6 +71,8 @@ export declare class SiteWithEcsBackend extends CommonConstruct {
|
|
|
71
71
|
* @summary Method to resolve a certificate based on attributes
|
|
72
72
|
*/
|
|
73
73
|
protected resolveCertificate(): void;
|
|
74
|
+
protected resolveGlobalCertificate(): void;
|
|
75
|
+
protected resolveRegionalCertificate(): void;
|
|
74
76
|
/**
|
|
75
77
|
* @summary Method to resolve secrets from SecretsManager
|
|
76
78
|
* - To be implemented in the overriding method in the implementation class
|
|
@@ -117,13 +117,23 @@ class SiteWithEcsBackend extends common_1.CommonConstruct {
|
|
|
117
117
|
* @summary Method to resolve a certificate based on attributes
|
|
118
118
|
*/
|
|
119
119
|
resolveCertificate() {
|
|
120
|
-
|
|
120
|
+
this.resolveGlobalCertificate();
|
|
121
|
+
this.resolveRegionalCertificate();
|
|
122
|
+
}
|
|
123
|
+
resolveGlobalCertificate() {
|
|
121
124
|
if (this.props.siteCertificate.useExistingCertificate &&
|
|
122
125
|
this.props.siteCertificate.certificateSsmName &&
|
|
123
126
|
this.props.siteCertificate.certificateRegion) {
|
|
124
127
|
this.props.siteCertificate.certificateArn = this.ssmManager.readStringParameterFromRegion(`${this.id}-certificate-parameter`, this, this.props.siteCertificate.certificateSsmName, this.props.siteCertificate.certificateRegion);
|
|
125
128
|
}
|
|
126
129
|
this.siteCertificate = this.acmManager.resolveCertificate(`${this.id}-certificate`, this, this.props.siteCertificate);
|
|
130
|
+
}
|
|
131
|
+
resolveRegionalCertificate() {
|
|
132
|
+
if (this.props.siteRegionalCertificate.useExistingCertificate &&
|
|
133
|
+
this.props.siteRegionalCertificate.certificateSsmName &&
|
|
134
|
+
this.props.siteRegionalCertificate.certificateRegion) {
|
|
135
|
+
this.props.siteRegionalCertificate.certificateArn = this.ssmManager.readStringParameterFromRegion(`${this.id}-regional-certificate-parameter`, this, this.props.siteRegionalCertificate.certificateSsmName, this.props.siteRegionalCertificate.certificateRegion);
|
|
136
|
+
}
|
|
127
137
|
this.siteRegionalCertificate = this.acmManager.resolveCertificate(`${this.id}-regional-certificate`, this, this.props.siteRegionalCertificate, this.siteHostedZone);
|
|
128
138
|
}
|
|
129
139
|
/**
|
package/package.json
CHANGED
|
@@ -111,7 +111,11 @@ export class SiteWithEcsBackend extends CommonConstruct {
|
|
|
111
111
|
* @summary Method to resolve a certificate based on attributes
|
|
112
112
|
*/
|
|
113
113
|
protected resolveCertificate() {
|
|
114
|
-
|
|
114
|
+
this.resolveGlobalCertificate()
|
|
115
|
+
this.resolveRegionalCertificate()
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
protected resolveGlobalCertificate() {
|
|
115
119
|
if (
|
|
116
120
|
this.props.siteCertificate.useExistingCertificate &&
|
|
117
121
|
this.props.siteCertificate.certificateSsmName &&
|
|
@@ -129,7 +133,21 @@ export class SiteWithEcsBackend extends CommonConstruct {
|
|
|
129
133
|
this,
|
|
130
134
|
this.props.siteCertificate
|
|
131
135
|
)
|
|
136
|
+
}
|
|
132
137
|
|
|
138
|
+
protected resolveRegionalCertificate() {
|
|
139
|
+
if (
|
|
140
|
+
this.props.siteRegionalCertificate.useExistingCertificate &&
|
|
141
|
+
this.props.siteRegionalCertificate.certificateSsmName &&
|
|
142
|
+
this.props.siteRegionalCertificate.certificateRegion
|
|
143
|
+
) {
|
|
144
|
+
this.props.siteRegionalCertificate.certificateArn = this.ssmManager.readStringParameterFromRegion(
|
|
145
|
+
`${this.id}-regional-certificate-parameter`,
|
|
146
|
+
this,
|
|
147
|
+
this.props.siteRegionalCertificate.certificateSsmName,
|
|
148
|
+
this.props.siteRegionalCertificate.certificateRegion
|
|
149
|
+
)
|
|
150
|
+
}
|
|
133
151
|
this.siteRegionalCertificate = this.acmManager.resolveCertificate(
|
|
134
152
|
`${this.id}-regional-certificate`,
|
|
135
153
|
this,
|