BuzzerboyAWSLightsail 0.329.1__py3-none-any.whl → 0.330.1__py3-none-any.whl
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.
- BuzzerboyAWSLightsailStack/LightsailBase.py +22 -18
- BuzzerboyAWSLightsailStack/LightsailContainer.py +17 -4
- BuzzerboyAWSLightsailStack/LightsailDatabase.py +19 -8
- {buzzerboyawslightsail-0.329.1.dist-info → buzzerboyawslightsail-0.330.1.dist-info}/METADATA +20 -1
- buzzerboyawslightsail-0.330.1.dist-info/RECORD +11 -0
- buzzerboyawslightsail-0.330.1.dist-info/licenses/LICENSE +17 -0
- buzzerboyawslightsail-0.329.1.dist-info/RECORD +0 -10
- {buzzerboyawslightsail-0.329.1.dist-info → buzzerboyawslightsail-0.330.1.dist-info}/WHEEL +0 -0
- {buzzerboyawslightsail-0.329.1.dist-info → buzzerboyawslightsail-0.330.1.dist-info}/top_level.txt +0 -0
|
@@ -79,7 +79,7 @@ class BaseLightsailArchitectureFlags(Enum):
|
|
|
79
79
|
#endregion
|
|
80
80
|
|
|
81
81
|
|
|
82
|
-
class LightsailBase(AWSArchitectureBase
|
|
82
|
+
class LightsailBase(AWSArchitectureBase):
|
|
83
83
|
"""
|
|
84
84
|
Abstract base class for AWS Lightsail Infrastructure Stacks.
|
|
85
85
|
|
|
@@ -126,19 +126,19 @@ class LightsailBase(AWSArchitectureBase, ABC):
|
|
|
126
126
|
# Default post-apply scripts executed after deployment
|
|
127
127
|
default_post_apply_scripts = []
|
|
128
128
|
|
|
129
|
-
|
|
130
|
-
@abstractmethod
|
|
131
|
-
def get_architecture_flags():
|
|
129
|
+
def get_architecture_flags(self):
|
|
132
130
|
"""
|
|
133
131
|
Get the ArchitectureFlags enum for configuration.
|
|
134
|
-
|
|
135
|
-
This method must be implemented by subclasses to return their
|
|
136
|
-
specific ArchitectureFlags enum class.
|
|
137
132
|
|
|
138
133
|
:returns: ArchitectureFlags enum class
|
|
139
|
-
:rtype: type[
|
|
134
|
+
:rtype: type[ArchitectureFlags]
|
|
140
135
|
"""
|
|
141
|
-
|
|
136
|
+
super_flags = super.get_architecture_flags()
|
|
137
|
+
this_flags = ArchitectureFlags
|
|
138
|
+
for flag in super_flags:
|
|
139
|
+
this_flags[flag.name] = flag.value
|
|
140
|
+
|
|
141
|
+
return this_flags
|
|
142
142
|
|
|
143
143
|
def __init__(self, scope, id, **kwargs):
|
|
144
144
|
"""
|
|
@@ -575,22 +575,26 @@ class LightsailBase(AWSArchitectureBase, ABC):
|
|
|
575
575
|
if not self.post_apply_scripts:
|
|
576
576
|
return
|
|
577
577
|
|
|
578
|
+
# Collect dependencies for post-apply scripts
|
|
579
|
+
dependencies = []
|
|
580
|
+
if hasattr(self, 'secrets_manager_secret'):
|
|
581
|
+
dependencies.append(self.secrets_manager_secret)
|
|
582
|
+
|
|
578
583
|
# Create a null resource for each post-apply script
|
|
579
584
|
for i, script in enumerate(self.post_apply_scripts):
|
|
580
585
|
script_resource = NullResource(
|
|
581
586
|
self,
|
|
582
587
|
f"post_apply_script_{i}",
|
|
583
|
-
|
|
584
|
-
"local-exec": {
|
|
585
|
-
"command": script,
|
|
586
|
-
"on_failure": "continue"
|
|
587
|
-
}
|
|
588
|
-
}]
|
|
588
|
+
depends_on=dependencies if dependencies else None
|
|
589
589
|
)
|
|
590
590
|
|
|
591
|
-
#
|
|
592
|
-
|
|
593
|
-
|
|
591
|
+
# Add provisioner using override
|
|
592
|
+
script_resource.add_override("provisioner", [{
|
|
593
|
+
"local-exec": {
|
|
594
|
+
"command": script,
|
|
595
|
+
"on_failure": "continue"
|
|
596
|
+
}
|
|
597
|
+
}])
|
|
594
598
|
|
|
595
599
|
# ==================== UTILITY METHODS ====================
|
|
596
600
|
|
|
@@ -66,16 +66,27 @@ from cdktf_cdktf_provider_aws.wafv2_rule_group import Wafv2RuleGroupRuleVisibili
|
|
|
66
66
|
|
|
67
67
|
|
|
68
68
|
#region ArchitectureFlags
|
|
69
|
-
class ArchitectureFlags(
|
|
69
|
+
class ArchitectureFlags(Enum):
|
|
70
70
|
"""
|
|
71
71
|
Architecture configuration flags for optional components.
|
|
72
72
|
|
|
73
|
-
|
|
73
|
+
Includes both base and container-specific flags.
|
|
74
74
|
|
|
75
|
+
Base flags:
|
|
76
|
+
:param SKIP_DEFAULT_POST_APPLY_SCRIPTS: Skip default post-apply scripts
|
|
77
|
+
:param PRESERVE_EXISTING_SECRETS: Don't overwrite existing secret versions
|
|
78
|
+
:param IGNORE_SECRET_CHANGES: Ignore all changes to secret after initial creation
|
|
79
|
+
|
|
80
|
+
Container-specific flags:
|
|
75
81
|
:param SKIP_DATABASE: Skip database creation
|
|
76
82
|
:param SKIP_DOMAIN: Skip domain and DNS configuration
|
|
77
83
|
"""
|
|
78
|
-
|
|
84
|
+
# Base flags (from BaseLightsailArchitectureFlags)
|
|
85
|
+
SKIP_DEFAULT_POST_APPLY_SCRIPTS = "skip_default_post_apply_scripts"
|
|
86
|
+
PRESERVE_EXISTING_SECRETS = "preserve_existing_secrets"
|
|
87
|
+
IGNORE_SECRET_CHANGES = "ignore_secret_changes"
|
|
88
|
+
|
|
89
|
+
# Container-specific flags
|
|
79
90
|
SKIP_DATABASE = "skip_database"
|
|
80
91
|
SKIP_DOMAIN = "skip_domain"
|
|
81
92
|
|
|
@@ -174,7 +185,7 @@ class LightsailContainerStack(LightsailBase):
|
|
|
174
185
|
super()._set_default_post_apply_scripts()
|
|
175
186
|
|
|
176
187
|
# Skip if flag is set
|
|
177
|
-
if
|
|
188
|
+
if ArchitectureFlags.SKIP_DEFAULT_POST_APPLY_SCRIPTS.value in self.flags:
|
|
178
189
|
return
|
|
179
190
|
|
|
180
191
|
# Add container-specific scripts
|
|
@@ -270,6 +281,8 @@ class LightsailContainerStack(LightsailBase):
|
|
|
270
281
|
"host": self.database.master_endpoint_address,
|
|
271
282
|
"port": self.database.master_endpoint_port,
|
|
272
283
|
}
|
|
284
|
+
)
|
|
285
|
+
|
|
273
286
|
def create_s3_bucket(self, bucket_name=None):
|
|
274
287
|
"""
|
|
275
288
|
Create S3 bucket for application data storage.
|
|
@@ -42,15 +42,26 @@ from cdktf_cdktf_provider_random import password
|
|
|
42
42
|
#endregion
|
|
43
43
|
|
|
44
44
|
#region ArchitectureFlags
|
|
45
|
-
class ArchitectureFlags(
|
|
45
|
+
class ArchitectureFlags(Enum):
|
|
46
46
|
"""
|
|
47
47
|
Architecture configuration flags for optional components.
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
Includes both base and database-specific flags.
|
|
50
50
|
|
|
51
|
+
Base flags:
|
|
52
|
+
:param SKIP_DEFAULT_POST_APPLY_SCRIPTS: Skip default post-apply scripts
|
|
53
|
+
:param PRESERVE_EXISTING_SECRETS: Don't overwrite existing secret versions
|
|
54
|
+
:param IGNORE_SECRET_CHANGES: Ignore all changes to secret after initial creation
|
|
55
|
+
|
|
56
|
+
Database-specific flags:
|
|
51
57
|
:param SKIP_DATABASE_USERS: Skip creating individual database users (use master user only)
|
|
52
58
|
"""
|
|
53
|
-
|
|
59
|
+
# Base flags (from BaseLightsailArchitectureFlags)
|
|
60
|
+
SKIP_DEFAULT_POST_APPLY_SCRIPTS = "skip_default_post_apply_scripts"
|
|
61
|
+
PRESERVE_EXISTING_SECRETS = "preserve_existing_secrets"
|
|
62
|
+
IGNORE_SECRET_CHANGES = "ignore_secret_changes"
|
|
63
|
+
|
|
64
|
+
# Database-specific flags
|
|
54
65
|
SKIP_DATABASE_USERS = "skip_database_users"
|
|
55
66
|
|
|
56
67
|
#endregion
|
|
@@ -124,10 +135,7 @@ class LightsailDatabaseStack(LightsailBase):
|
|
|
124
135
|
environment = kwargs.get("environment", "dev")
|
|
125
136
|
kwargs["secret_name"] = f"{project_name}/{environment}/database-credentials"
|
|
126
137
|
|
|
127
|
-
#
|
|
128
|
-
super().__init__(scope, id, **kwargs)
|
|
129
|
-
|
|
130
|
-
# ===== Database-Specific Configuration =====
|
|
138
|
+
# ===== Database-Specific Configuration (set before parent init) =====
|
|
131
139
|
self.databases = kwargs.get("databases", [])
|
|
132
140
|
|
|
133
141
|
# Validate required parameters
|
|
@@ -142,6 +150,9 @@ class LightsailDatabaseStack(LightsailBase):
|
|
|
142
150
|
# ===== Internal State =====
|
|
143
151
|
self.database_users = {}
|
|
144
152
|
self.database_passwords = {}
|
|
153
|
+
|
|
154
|
+
# Call parent constructor
|
|
155
|
+
super().__init__(scope, id, **kwargs)
|
|
145
156
|
|
|
146
157
|
def _set_default_post_apply_scripts(self):
|
|
147
158
|
"""
|
|
@@ -151,7 +162,7 @@ class LightsailDatabaseStack(LightsailBase):
|
|
|
151
162
|
super()._set_default_post_apply_scripts()
|
|
152
163
|
|
|
153
164
|
# Skip if flag is set
|
|
154
|
-
if
|
|
165
|
+
if ArchitectureFlags.SKIP_DEFAULT_POST_APPLY_SCRIPTS.value in self.flags:
|
|
155
166
|
return
|
|
156
167
|
|
|
157
168
|
# Add database-specific scripts before the final message
|
{buzzerboyawslightsail-0.329.1.dist-info → buzzerboyawslightsail-0.330.1.dist-info}/METADATA
RENAMED
|
@@ -1,10 +1,27 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: BuzzerboyAWSLightsail
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.330.1
|
|
4
4
|
Summary: Buzzerboy Architecture for Deploying Web Applications on AWS LightSail
|
|
5
5
|
Home-page: https://www.buzzerboy.com/
|
|
6
6
|
Author: Buzzerboy Inc
|
|
7
7
|
Author-email: Buzzerboy Inc <info@buzzerboy.com>
|
|
8
|
+
License: Copyright (c) 2024 Buzzerboy Inc. Canada. All Rights Reserved.
|
|
9
|
+
|
|
10
|
+
This product and associated files (the "Software") is only available for use
|
|
11
|
+
within projects developed by Buzzerboy Inc. Canada with subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
For commercial projects, permission of use is required by sending an email to info@buzzerboy.com
|
|
17
|
+
|
|
18
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
19
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
20
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
21
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
23
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
24
|
+
SOFTWARE.
|
|
8
25
|
Project-URL: Homepage, https://www.buzzerboy.com/
|
|
9
26
|
Project-URL: Issues, https://dev.azure.com/buzzerboyinc/buzzerboy
|
|
10
27
|
Classifier: Programming Language :: Python :: 3
|
|
@@ -12,6 +29,7 @@ Classifier: License :: OSI Approved :: MIT License
|
|
|
12
29
|
Classifier: Operating System :: OS Independent
|
|
13
30
|
Requires-Python: >=3.8
|
|
14
31
|
Description-Content-Type: text/markdown
|
|
32
|
+
License-File: LICENSE
|
|
15
33
|
Requires-Dist: cdktf<1.0,>=0.17.0
|
|
16
34
|
Requires-Dist: constructs<11.0,>=10.0.0
|
|
17
35
|
Requires-Dist: cdktf-cdktf-provider-aws>=12.0.0
|
|
@@ -24,6 +42,7 @@ Requires-Dist: BuzzerboyArchetype
|
|
|
24
42
|
Requires-Dist: AWSArchitectureBase
|
|
25
43
|
Dynamic: author
|
|
26
44
|
Dynamic: home-page
|
|
45
|
+
Dynamic: license-file
|
|
27
46
|
Dynamic: requires-dist
|
|
28
47
|
Dynamic: requires-python
|
|
29
48
|
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
BuzzerboyAWSLightsailStack/LightSailPostDeploy.py,sha256=uOEOe5qORPgvivC0Ba0w045PQztfS6z-ynwyikaPQzI,5025
|
|
2
|
+
BuzzerboyAWSLightsailStack/LightsailAIContainer.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
+
BuzzerboyAWSLightsailStack/LightsailBase.py,sha256=Fn1RQv4lVtkLmCZH6FFpxpnGQ6W0CRjF7nNNjI_uFjY,26085
|
|
4
|
+
BuzzerboyAWSLightsailStack/LightsailContainer.py,sha256=XnJU1iydnmiWTB_9MNIA9pnvsAnMyymuw38koKJj4bM,13831
|
|
5
|
+
BuzzerboyAWSLightsailStack/LightsailDatabase.py,sha256=hXZzphlD3COTd7J7yNjzHFqQu-wvh1fX6k7LRoPvews,15962
|
|
6
|
+
BuzzerboyAWSLightsailStack/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
|
+
buzzerboyawslightsail-0.330.1.dist-info/licenses/LICENSE,sha256=hxCyRAUWBBbbve3BaE8Qtl_sxcUo-8AYNAslHjeiu3w,921
|
|
8
|
+
buzzerboyawslightsail-0.330.1.dist-info/METADATA,sha256=vYh8iPWubNWfx3fcSktLnl3H8T7J5c7n6kKSNOT343I,4942
|
|
9
|
+
buzzerboyawslightsail-0.330.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
10
|
+
buzzerboyawslightsail-0.330.1.dist-info/top_level.txt,sha256=xqYoH36d7_13q4vRi5bZr1zIz9mR7b8ms_6ez3BqRgQ,27
|
|
11
|
+
buzzerboyawslightsail-0.330.1.dist-info/RECORD,,
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
Copyright (c) 2024 Buzzerboy Inc. Canada. All Rights Reserved.
|
|
2
|
+
|
|
3
|
+
This product and associated files (the "Software") is only available for use
|
|
4
|
+
within projects developed by Buzzerboy Inc. Canada with subject to the following conditions:
|
|
5
|
+
|
|
6
|
+
The above copyright notice and this permission notice shall be included in all
|
|
7
|
+
copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
For commercial projects, permission of use is required by sending an email to info@buzzerboy.com
|
|
10
|
+
|
|
11
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
12
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
13
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
14
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
15
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
16
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
17
|
+
SOFTWARE.
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
BuzzerboyAWSLightsailStack/LightSailPostDeploy.py,sha256=uOEOe5qORPgvivC0Ba0w045PQztfS6z-ynwyikaPQzI,5025
|
|
2
|
-
BuzzerboyAWSLightsailStack/LightsailAIContainer.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
-
BuzzerboyAWSLightsailStack/LightsailBase.py,sha256=YfQrFNHvdWxGgpgy1A2CgAD2R5fz_ebQyVaADZaxCPw,25946
|
|
4
|
-
BuzzerboyAWSLightsailStack/LightsailContainer.py,sha256=_PvA5fMFEHdlI-jATcDTOAOs6R0MHwBj5Hjudh4SMxI,13314
|
|
5
|
-
BuzzerboyAWSLightsailStack/LightsailDatabase.py,sha256=hffRjVbYADV7SK5cD4orwt0etb-pTDxtQvEv58iQyyI,15425
|
|
6
|
-
BuzzerboyAWSLightsailStack/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
|
-
buzzerboyawslightsail-0.329.1.dist-info/METADATA,sha256=CXKk9RZiVbGDaQksYC_7spEH2HqjlK5I2-ORAbpdPj4,3839
|
|
8
|
-
buzzerboyawslightsail-0.329.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
9
|
-
buzzerboyawslightsail-0.329.1.dist-info/top_level.txt,sha256=xqYoH36d7_13q4vRi5bZr1zIz9mR7b8ms_6ez3BqRgQ,27
|
|
10
|
-
buzzerboyawslightsail-0.329.1.dist-info/RECORD,,
|
|
File without changes
|
{buzzerboyawslightsail-0.329.1.dist-info → buzzerboyawslightsail-0.330.1.dist-info}/top_level.txt
RENAMED
|
File without changes
|