Skip to content

Commit 1e39b44

Browse files
esronEsron Silva
and
Esron Silva
authored
BugFix: remove unused method (#4864)
Co-authored-by: Esron Silva <[email protected]>
1 parent 45e0a28 commit 1e39b44

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

reconcile/utils/terrascript_aws_client.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5179,13 +5179,13 @@ def _get_alb_rule_condition_value(condition):
51795179
return {condition_type_key: {"values": condition[condition_type_key]}}
51805180

51815181
@staticmethod
5182-
def _get_principal_for_s3_bucket_policy(
5183-
region: str, elb_account_id: str | None
5184-
) -> Mapping[str, str]:
5182+
def _get_principal_for_s3_bucket_policy(region: str) -> Mapping[str, str]:
51855183
if region in AWS_ELB_ACCOUNT_IDS:
5186-
return {"AWS": f"arn:aws:iam::{elb_account_id}:root"}
5184+
return {"AWS": f"arn:aws:iam::{AWS_ELB_ACCOUNT_IDS[region]}:root"}
51875185
if region in AWS_US_GOV_ELB_ACCOUNT_IDS:
5188-
return {"AWS": f"arn:aws-us-gov:iam::{elb_account_id}:root"}
5186+
return {
5187+
"AWS": f"arn:aws-us-gov:iam::{AWS_US_GOV_ELB_ACCOUNT_IDS[region]}:root"
5188+
}
51895189
return {"Service": "logdelivery.elasticloadbalancing.amazonaws.com"}
51905190

51915191
def populate_tf_resource_alb(self, spec, ocm_map=None):
@@ -5305,8 +5305,7 @@ def populate_tf_resource_alb(self, spec, ocm_map=None):
53055305
region = str(
53065306
common_values.get("region") or self.default_regions.get(account)
53075307
)
5308-
elb_account_id = self._get_elb_account_id(region)
5309-
principal = self._get_principal_for_s3_bucket_policy(region, elb_account_id)
5308+
principal = self._get_principal_for_s3_bucket_policy(region)
53105309

53115310
policy = {
53125311
"Version": "2012-10-17",

0 commit comments

Comments
 (0)