Skip to content

Commit

Permalink
fix(resource_factory): validate if aws provider has a region
Browse files Browse the repository at this point in the history
  • Loading branch information
kkiani committed Aug 1, 2024
1 parent 85d6c56 commit 82735c3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/damavand/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ def __init__(
provider: CloudProvider,
resources: list[BaseResource] = [],
) -> None:
if isinstance(provider, AwsProvider) and not provider.region:
raise ValueError("AWS provider must have a region set.")

self.app_name = app_name
self.provider = provider
self._resources = resources
Expand Down

0 comments on commit 82735c3

Please sign in to comment.