Skip to content

Commit

Permalink
fix: remove dangerous default ADF_ORG_STAGE and dont update config fo…
Browse files Browse the repository at this point in the history
…r ADF Org Specific config if Param not set (#717)
  • Loading branch information
alexevansigg committed Apr 17, 2024
1 parent 915e716 commit 4ebf49b
Showing 1 changed file with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class PipelineDefinition(TypedDict):
DEPLOYMENT_ACCOUNT_REGION = os.environ["AWS_REGION"]
PROJECT_NAME = os.environ["ADF_PROJECT_NAME"]
EMPTY_PARAMS_DICT: ParametersAndTags = {'Parameters': {}, 'Tags': {}}
ADF_ORG_STAGE = os.getenv("ADF_ORG_STAGE", "dev")
ADF_ORG_STAGE = os.getenv("ADF_ORG_STAGE")


class Parameters:
Expand Down Expand Up @@ -302,13 +302,14 @@ def create_parameter_files(self) -> None:
current_params
)
# Compare account_region final to global_stage
current_params = self._merge_params(
Parameters._parse(
params_root_path=self.cwd,
params_filename=f"global_{ADF_ORG_STAGE}",
),
current_params,
)
if ADF_ORG_STAGE:
current_params = self._merge_params(
Parameters._parse(
params_root_path=self.cwd,
params_filename=f"global_{ADF_ORG_STAGE}",
),
current_params,
)
# Compare account_region final to global
current_params = self._merge_params(
Parameters._parse(
Expand Down

0 comments on commit 4ebf49b

Please sign in to comment.