# coding=utf-8
# *** WARNING: this file was generated by pulumi-language-python. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import builtins
import copy
import warnings
import sys
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
if sys.version_info >= (3, 11):
    from typing import NotRequired, TypedDict, TypeAlias
else:
    from typing_extensions import NotRequired, TypedDict, TypeAlias
from .. import _utilities

__all__ = [
    'GetLocalReferenceResult',
    'AwaitableGetLocalReferenceResult',
    'get_local_reference',
    'get_local_reference_output',
]

@pulumi.output_type
class GetLocalReferenceResult:
    """
    The result of fetching from a Terraform state store.
    """
    def __init__(__self__, outputs=None):
        if outputs and not isinstance(outputs, dict):
            raise TypeError("Expected argument 'outputs' to be a dict")
        pulumi.set(__self__, "outputs", outputs)

    @property
    @pulumi.getter
    def outputs(self) -> Mapping[str, Any]:
        """
        The outputs displayed from Terraform state.
        """
        return pulumi.get(self, "outputs")


class AwaitableGetLocalReferenceResult(GetLocalReferenceResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetLocalReferenceResult(
            outputs=self.outputs)


def get_local_reference(path: Optional[builtins.str] = None,
                        workspace_dir: Optional[builtins.str] = None,
                        opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetLocalReferenceResult:
    """
    Access state from the local filesystem.


    :param builtins.str path: The path to the tfstate file. This defaults to "terraform.tfstate" relative to the root module by default.
    :param builtins.str workspace_dir: The path to non-default workspaces.
    """
    __args__ = dict()
    __args__['path'] = path
    __args__['workspaceDir'] = workspace_dir
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('terraform:state:getLocalReference', __args__, opts=opts, typ=GetLocalReferenceResult).value

    return AwaitableGetLocalReferenceResult(
        outputs=pulumi.get(__ret__, 'outputs'))
def get_local_reference_output(path: Optional[pulumi.Input[Optional[builtins.str]]] = None,
                               workspace_dir: Optional[pulumi.Input[Optional[builtins.str]]] = None,
                               opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetLocalReferenceResult]:
    """
    Access state from the local filesystem.


    :param builtins.str path: The path to the tfstate file. This defaults to "terraform.tfstate" relative to the root module by default.
    :param builtins.str workspace_dir: The path to non-default workspaces.
    """
    __args__ = dict()
    __args__['path'] = path
    __args__['workspaceDir'] = workspace_dir
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('terraform:state:getLocalReference', __args__, opts=opts, typ=GetLocalReferenceResult)
    return __ret__.apply(lambda __response__: GetLocalReferenceResult(
        outputs=pulumi.get(__response__, 'outputs')))
