Taragolis commented on code in PR #38536:
URL: https://github.com/apache/airflow/pull/38536#discussion_r1541468429
##########
airflow/providers/hashicorp/_internal_client/vault_client.py:
##########
@@ -103,7 +108,11 @@ def __init__(
password: str | None = None,
key_id: str | None = None,
secret_id: str | None = None,
+ session_token: str | None = None,
+ header_value: str | None = None,
role_id: str | None = None,
+ use_token: bool = True,
+ region: str = "us-east-1",
Review Comment:
I'm know that hvac client use `us-east-1` as default region 🤦 🤦♂️ 🤦♀️
https://github.com/hvac/hvac/blob/6e47552b12573bb150a042922031bf95e4231759/hvac/aws_utils.py#L8
In general by default it is not a good idea redirect to US region,
especially if customer from other regions.
I would suggest to set it by default to None and fallback from environment
variables, which commonly uses in different AWS SDKs (`AWS_REGION` in all SDKs,
and `AWS_DEFAULT_REGION` in addition in botocore/boto and AWS CLI) and provide
it conditionally
```python
region = os.environ.get("AWS_REGION") or
os.environ.get("AWS_DEFAULT_REGION") or "us-east-1"
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]