Skip to content

Commit

Permalink
update regex expression
Browse files Browse the repository at this point in the history
  • Loading branch information
abikouo committed Jul 3, 2024
1 parent a21cd12 commit f127370
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/inventory/terraform_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ def parse_provider_from_state_file_resource(provider: str) -> Optional[str]:
"module.my-aws-module.provider[\"registry.terraform.io/hashicorp/aws\"]" -> for module resources
"""
result = None
m = re.search('^.*provider\\["(.*)"\\]', provider)
m = re.search(r'^.*provider\["(.*)"\]', provider)
if m:
result = m.group(1)
return result
Expand Down

0 comments on commit f127370

Please sign in to comment.