def __init__(self, scope: core.App, stack_id: str, **kwargs) -> None:
    super().__init__(scope, stack_id, **kwargs)
    app_context.update(app=scope, current_stack=self)
    if (self.is_valid_environment is False):
        raise Exception(f'`{get_environment()}` must be a valid environment allowed values {ALLOWED_ENVIRONMENTS}')
    for resources in (self.EXISTING_RESOURCES or []):
        (resource_name, Resource, resource_attrs) = (self.get_resource_name(resources[0]), resources[1], (resources[2] if (len(resources) == 3) else {}))
        setattr(self, resource_name, Resource(scope=self, construct_id=resources[0], **resource_attrs))
    for resources in (self.RESOURCES or []):
        (resource_name, Resource, resource_attrs) = (self.get_resource_name(resources[0]), resources[1], (resources[2] if (len(resources) == 3) else {}))
        resource = Resource(scope=self, construct_id=resource_name)
        setattr(self, resource_name, resource)
def __init__(self, scope: core.App, stack_id: str, **kwargs) -> None:
    super().__init__(scope, stack_id, **kwargs)
    app_context.update(app=scope, current_stack=self)
    if (self.is_valid_environment is False):
        raise Exception(f'`{get_environment()}` must be a valid environment allowed values {ALLOWED_ENVIRONMENTS}')
    for resources in (self.EXISTING_RESOURCES or []):
        (resource_name, Resource, resource_attrs) = (self.get_resource_name(resources[0]), resources[1], (resources[2] if (len(resources) == 3) else {}))
        setattr(self, resource_name, Resource(scope=self, construct_id=resources[0], **resource_attrs))
    for resources in (self.RESOURCES or []):
        (resource_name, Resource, resource_attrs) = (self.get_resource_name(resources[0]), resources[1], (resources[2] if (len(resources) == 3) else {}))
        resource = Resource(scope=self, construct_id=resource_name)
        setattr(self, resource_name, resource)