BuzzerboyAWSLightsail 0.329.1__tar.gz → 0.330.1__tar.gz

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 (19) hide show
  1. {buzzerboyawslightsail-0.329.1 → buzzerboyawslightsail-0.330.1}/BuzzerboyAWSLightsail.egg-info/PKG-INFO +20 -1
  2. {buzzerboyawslightsail-0.329.1 → buzzerboyawslightsail-0.330.1}/BuzzerboyAWSLightsail.egg-info/SOURCES.txt +1 -0
  3. {buzzerboyawslightsail-0.329.1 → buzzerboyawslightsail-0.330.1}/BuzzerboyAWSLightsailStack/LightsailBase.py +22 -18
  4. {buzzerboyawslightsail-0.329.1 → buzzerboyawslightsail-0.330.1}/BuzzerboyAWSLightsailStack/LightsailContainer.py +17 -4
  5. {buzzerboyawslightsail-0.329.1 → buzzerboyawslightsail-0.330.1}/BuzzerboyAWSLightsailStack/LightsailDatabase.py +19 -8
  6. buzzerboyawslightsail-0.330.1/LICENSE +17 -0
  7. {buzzerboyawslightsail-0.329.1 → buzzerboyawslightsail-0.330.1}/PKG-INFO +20 -1
  8. {buzzerboyawslightsail-0.329.1 → buzzerboyawslightsail-0.330.1}/pyproject.toml +1 -1
  9. {buzzerboyawslightsail-0.329.1 → buzzerboyawslightsail-0.330.1}/BuzzerboyAWSLightsail.egg-info/dependency_links.txt +0 -0
  10. {buzzerboyawslightsail-0.329.1 → buzzerboyawslightsail-0.330.1}/BuzzerboyAWSLightsail.egg-info/requires.txt +0 -0
  11. {buzzerboyawslightsail-0.329.1 → buzzerboyawslightsail-0.330.1}/BuzzerboyAWSLightsail.egg-info/top_level.txt +0 -0
  12. {buzzerboyawslightsail-0.329.1 → buzzerboyawslightsail-0.330.1}/BuzzerboyAWSLightsailStack/LightSailPostDeploy.py +0 -0
  13. {buzzerboyawslightsail-0.329.1 → buzzerboyawslightsail-0.330.1}/BuzzerboyAWSLightsailStack/LightsailAIContainer.py +0 -0
  14. {buzzerboyawslightsail-0.329.1 → buzzerboyawslightsail-0.330.1}/BuzzerboyAWSLightsailStack/__init__.py +0 -0
  15. {buzzerboyawslightsail-0.329.1 → buzzerboyawslightsail-0.330.1}/MANIFEST.in +0 -0
  16. {buzzerboyawslightsail-0.329.1 → buzzerboyawslightsail-0.330.1}/README.md +0 -0
  17. {buzzerboyawslightsail-0.329.1 → buzzerboyawslightsail-0.330.1}/requirements.txt +0 -0
  18. {buzzerboyawslightsail-0.329.1 → buzzerboyawslightsail-0.330.1}/setup.cfg +0 -0
  19. {buzzerboyawslightsail-0.329.1 → buzzerboyawslightsail-0.330.1}/setup.py +0 -0
@@ -1,10 +1,27 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: BuzzerboyAWSLightsail
3
- Version: 0.329.1
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
 
@@ -1,3 +1,4 @@
1
+ LICENSE
1
2
  MANIFEST.in
2
3
  README.md
3
4
  pyproject.toml
@@ -79,7 +79,7 @@ class BaseLightsailArchitectureFlags(Enum):
79
79
  #endregion
80
80
 
81
81
 
82
- class LightsailBase(AWSArchitectureBase, ABC):
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
- @staticmethod
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[Enum]
134
+ :rtype: type[ArchitectureFlags]
140
135
  """
141
- pass
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
- provisioner=[{
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
- # Ensure scripts depend on core infrastructure
592
- if hasattr(self, 'secrets_manager_secret'):
593
- script_resource.add_override("depends_on", [self.secrets_manager_secret.fqn])
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(BaseLightsailArchitectureFlags):
69
+ class ArchitectureFlags(Enum):
70
70
  """
71
71
  Architecture configuration flags for optional components.
72
72
 
73
- Extends BaseLightsailArchitectureFlags with container-specific flags.
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 BaseLightsailArchitectureFlags.SKIP_DEFAULT_POST_APPLY_SCRIPTS.value in self.flags:
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(BaseLightsailArchitectureFlags):
45
+ class ArchitectureFlags(Enum):
46
46
  """
47
47
  Architecture configuration flags for optional components.
48
48
 
49
- Extends BaseLightsailArchitectureFlags with database-specific flags.
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
- # Call parent constructor
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 BaseLightsailArchitectureFlags.SKIP_DEFAULT_POST_APPLY_SCRIPTS.value in self.flags:
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
@@ -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 +1,27 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: BuzzerboyAWSLightsail
3
- Version: 0.329.1
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
 
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "BuzzerboyAWSLightsail"
3
- version = "0.329.1"
3
+ version = "0.330.1"
4
4
  description = "Buzzerboy Architecture for Deploying Web Applications on AWS LightSail"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.8"