If I have the class below and want to call/use the...
# general
m
If I have the class below and want to call/use the registered output in another module, how can i call it? When i try importing the class and calling it as
pki_intermediate_environment_backend.pki_intermediate_environment_backend_path
it throws the following AttributeError:
Copy code
'OLVaultPKIIntermediateEnvBackend' object has no attribute 'pki_intermediate_environment_backend_path'
Here’s the class:
Copy code
class OLVaultPKIIntermediateEnvBackend(ComponentResource):

    def __init__(
        self,
        backend_config: OLVaultPKIIntermediateEnvBackendConfig,
        opts: ResourceOptions = None,
    ):
        super().__init__(
            "ol:services:Vault:PKI:IntermediateEnvBackendConfig",
            backend_config.environment_name,
            None,
            opts,
        )

        resource_options = ResourceOptions(parent=self).merge(opts)  # type: ignore

        self.pki_intermediate_environment_backend = Mount(
            f"pki-intermediate-{backend_config.environment_name}",
            opts=resource_options,
            path=f"pki-intermediate-{backend_config.environment_name}",
            type="pki",
            description=f"Backend to create certs for pki-intermediate-{backend_config.environment_name} backends",
            max_lease_ttl_seconds=backend_config.max_ttl,
            default_lease_ttl_seconds=backend_config.default_ttl,
        )

self.register_outputs(
            {
                "pki_intermediate_environment_backend_path": self.pki_intermediate_environment_backend.id,
            }
        )