Skip to content

Commit

Permalink
validate after default
Browse files Browse the repository at this point in the history
  • Loading branch information
abuabraham-ttd committed Dec 11, 2024
1 parent 0bff456 commit e669887
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/aws/ec2.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ def add_defaults(configs: Dict[str, any]) -> AWSConfidentialComputeConfig:
except Exception as e:
raise RuntimeError("Please use IAM instance profile for your instance that has permission to access Secret Manager")
try:
secret = json.loads(client.get_secret_value(SecretId=secret_identifier)["SecretString"])
secret = add_defaults(json.loads(client.get_secret_value(SecretId=secret_identifier)["SecretString"]))
self.__validate_aws_specific_config(secret)
return add_defaults(secret)
return secret
except ClientError as _:
raise SecretNotFoundException(f"{secret_identifier} in {region}")

Expand Down

0 comments on commit e669887

Please sign in to comment.