-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into acouch/issue-3306-save-opps-buttons
- Loading branch information
Showing
89 changed files
with
2,740 additions
and
902 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
_commit: 929a959 | ||
_commit: platform-cli-migration/v0.4.0 | ||
_src_path: https://github.com/navapbc/template-infra | ||
app_name: analytics | ||
template: app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
_commit: 929a959 | ||
_commit: platform-cli-migration/v0.4.0 | ||
_src_path: https://github.com/navapbc/template-infra | ||
app_name: api | ||
template: app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
_commit: 929a959 | ||
_commit: platform-cli-migration/v0.4.0 | ||
_src_path: https://github.com/navapbc/template-infra | ||
app_name: frontend | ||
template: app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
_commit: 929a959 | ||
_commit: platform-cli-migration/v0.4.0 | ||
_src_path: https://github.com/navapbc/template-infra | ||
app_name: template-only | ||
template: base |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,33 @@ | ||
import os | ||
|
||
import boto3 | ||
|
||
from src.util.env_config import PydanticBaseEnvConfig | ||
|
||
|
||
class BaseAwsConfig(PydanticBaseEnvConfig): | ||
is_local_aws: bool = False | ||
|
||
|
||
_base_aws_config: BaseAwsConfig | None = None | ||
|
||
|
||
def get_base_aws_config() -> BaseAwsConfig: | ||
global _base_aws_config | ||
if _base_aws_config is None: | ||
_base_aws_config = BaseAwsConfig() | ||
|
||
return _base_aws_config | ||
|
||
|
||
def is_local_aws() -> bool: | ||
"""Whether we are running against local AWS which affects the credentials we use (forces them to be not real)""" | ||
return get_base_aws_config().is_local_aws | ||
|
||
|
||
def get_boto_session() -> boto3.Session: | ||
is_local = bool(os.getenv("IS_LOCAL_AWS", False)) | ||
if is_local: | ||
return boto3.Session(aws_access_key_id="NO_CREDS", aws_secret_access_key="NO_CREDS") | ||
if is_local_aws(): | ||
# Locally, set fake creds in a region we don't actually use so we can't hit actual AWS resources | ||
return boto3.Session( | ||
aws_access_key_id="NO_CREDS", aws_secret_access_key="NO_CREDS", region_name="us-west-2" | ||
) | ||
|
||
return boto3.Session() |
Oops, something went wrong.