fix: include private_key_password in provider.tf for encrypted OCI keys
This commit is contained in:
@@ -3935,10 +3935,13 @@ async def _terraform_exec(wid: str, action: str, user: dict):
|
||||
if ref_alias not in [a[0] for a in alias_blocks]:
|
||||
alias_blocks.append((ref_alias, '"unknown"'))
|
||||
|
||||
passphrase = oci_cfg.get('pass_phrase', '')
|
||||
cred_block = f''' tenancy_ocid = "{oci_cfg.get('tenancy', '')}"
|
||||
user_ocid = "{oci_cfg.get('user', '')}"
|
||||
fingerprint = "{oci_cfg.get('fingerprint', '')}"
|
||||
private_key_path = "{oci_cfg.get('key_file', '')}"'''
|
||||
if passphrase:
|
||||
cred_block += f'\n private_key_password = "{passphrase}"'
|
||||
|
||||
# Use region from OCI config row (may differ from oci sdk config)
|
||||
with db() as c:
|
||||
|
||||
Reference in New Issue
Block a user