How to use the pulumi.runtime.ResourceModule function in pulumi

To help you get started, we’ve selected a few pulumi examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pulumi / pulumi-google-native / sdk / python / pulumi_google_cloud / file / v1 / __init__.py View on Github external
def _register_module():
    import pulumi
    from ... import _utilities


    class Module(pulumi.runtime.ResourceModule):
        _version = _utilities.get_semver_version()

        def version(self):
            return Module._version

        def construct(self, name: str, typ: str, urn: str) -> pulumi.Resource:
            if typ == "google-cloud:file/v1:Backup":
                return Backup(name, pulumi.ResourceOptions(urn=urn))
            elif typ == "google-cloud:file/v1:Instance":
                return Instance(name, pulumi.ResourceOptions(urn=urn))
            else:
                raise Exception(f"unknown resource type {typ}")


    _module_instance = Module()
    pulumi.runtime.register_resource_module("google-cloud", "file/v1", _module_instance)
github pulumi / pulumi-google-native / sdk / python / pulumi_google_cloud / cloudresourcemanager / v2beta1 / __init__.py View on Github external
def _register_module():
    import pulumi
    from ... import _utilities


    class Module(pulumi.runtime.ResourceModule):
        _version = _utilities.get_semver_version()

        def version(self):
            return Module._version

        def construct(self, name: str, typ: str, urn: str) -> pulumi.Resource:
            if typ == "google-cloud:cloudresourcemanager/v2beta1:Folder":
                return Folder(name, pulumi.ResourceOptions(urn=urn))
            elif typ == "google-cloud:cloudresourcemanager/v2beta1:FolderIamPolicy":
                return FolderIamPolicy(name, pulumi.ResourceOptions(urn=urn))
            else:
                raise Exception(f"unknown resource type {typ}")


    _module_instance = Module()
    pulumi.runtime.register_resource_module("google-cloud", "cloudresourcemanager/v2beta1", _module_instance)
github pulumi / pulumi-google-native / sdk / python / pulumi_google_cloud / accesscontextmanager / v1beta / __init__.py View on Github external
def _register_module():
    import pulumi
    from ... import _utilities


    class Module(pulumi.runtime.ResourceModule):
        _version = _utilities.get_semver_version()

        def version(self):
            return Module._version

        def construct(self, name: str, typ: str, urn: str) -> pulumi.Resource:
            if typ == "google-cloud:accesscontextmanager/v1beta:AccessPolicy":
                return AccessPolicy(name, pulumi.ResourceOptions(urn=urn))
            elif typ == "google-cloud:accesscontextmanager/v1beta:AccessPolicyAccessLevel":
                return AccessPolicyAccessLevel(name, pulumi.ResourceOptions(urn=urn))
            elif typ == "google-cloud:accesscontextmanager/v1beta:AccessPolicyServicePerimeter":
                return AccessPolicyServicePerimeter(name, pulumi.ResourceOptions(urn=urn))
            else:
                raise Exception(f"unknown resource type {typ}")
github pulumi / pulumi-google-native / sdk / python / pulumi_google_native / datacatalog / v1beta1 / __init__.py View on Github external
def _register_module():
    import pulumi
    from ... import _utilities


    class Module(pulumi.runtime.ResourceModule):
        _version = _utilities.get_semver_version()

        def version(self):
            return Module._version

        def construct(self, name: str, typ: str, urn: str) -> pulumi.Resource:
            if typ == "google-native:datacatalog/v1beta1:Entry":
                return Entry(name, pulumi.ResourceOptions(urn=urn))
            elif typ == "google-native:datacatalog/v1beta1:EntryGroup":
                return EntryGroup(name, pulumi.ResourceOptions(urn=urn))
            elif typ == "google-native:datacatalog/v1beta1:EntryGroupIamPolicy":
                return EntryGroupIamPolicy(name, pulumi.ResourceOptions(urn=urn))
            elif typ == "google-native:datacatalog/v1beta1:PolicyTag":
                return PolicyTag(name, pulumi.ResourceOptions(urn=urn))
            elif typ == "google-native:datacatalog/v1beta1:TagTemplate":
                return TagTemplate(name, pulumi.ResourceOptions(urn=urn))
github pulumi / pulumi-google-native / sdk / python / pulumi_google_native / container / v1 / __init__.py View on Github external
def _register_module():
    import pulumi
    from ... import _utilities


    class Module(pulumi.runtime.ResourceModule):
        _version = _utilities.get_semver_version()

        def version(self):
            return Module._version

        def construct(self, name: str, typ: str, urn: str) -> pulumi.Resource:
            if typ == "google-native:container/v1:Cluster":
                return Cluster(name, pulumi.ResourceOptions(urn=urn))
            elif typ == "google-native:container/v1:NodePool":
                return NodePool(name, pulumi.ResourceOptions(urn=urn))
            else:
                raise Exception(f"unknown resource type {typ}")


    _module_instance = Module()
    pulumi.runtime.register_resource_module("google-native", "container/v1", _module_instance)
github pulumi / pulumi-google-native / sdk / python / pulumi_google_cloud / dataflow / v1b3 / __init__.py View on Github external
def _register_module():
    import pulumi
    from ... import _utilities


    class Module(pulumi.runtime.ResourceModule):
        _version = _utilities.get_semver_version()

        def version(self):
            return Module._version

        def construct(self, name: str, typ: str, urn: str) -> pulumi.Resource:
            if typ == "google-cloud:dataflow/v1b3:Job":
                return Job(name, pulumi.ResourceOptions(urn=urn))
            elif typ == "google-cloud:dataflow/v1b3:Template":
                return Template(name, pulumi.ResourceOptions(urn=urn))
            else:
                raise Exception(f"unknown resource type {typ}")


    _module_instance = Module()
    pulumi.runtime.register_resource_module("google-cloud", "dataflow/v1b3", _module_instance)
github pulumi / pulumi-google-native / sdk / python / pulumi_google_native / cloudresourcemanager / v3 / __init__.py View on Github external
def _register_module():
    import pulumi
    from ... import _utilities


    class Module(pulumi.runtime.ResourceModule):
        _version = _utilities.get_semver_version()

        def version(self):
            return Module._version

        def construct(self, name: str, typ: str, urn: str) -> pulumi.Resource:
            if typ == "google-native:cloudresourcemanager/v3:Folder":
                return Folder(name, pulumi.ResourceOptions(urn=urn))
            elif typ == "google-native:cloudresourcemanager/v3:FolderIamPolicy":
                return FolderIamPolicy(name, pulumi.ResourceOptions(urn=urn))
            elif typ == "google-native:cloudresourcemanager/v3:Lien":
                return Lien(name, pulumi.ResourceOptions(urn=urn))
            elif typ == "google-native:cloudresourcemanager/v3:OrganizationIamPolicy":
                return OrganizationIamPolicy(name, pulumi.ResourceOptions(urn=urn))
            elif typ == "google-native:cloudresourcemanager/v3:Project":
                return Project(name, pulumi.ResourceOptions(urn=urn))
github pulumi / pulumi-google-native / sdk / python / pulumi_google_cloud / securitycenter / v1beta1 / __init__.py View on Github external
def _register_module():
    import pulumi
    from ... import _utilities


    class Module(pulumi.runtime.ResourceModule):
        _version = _utilities.get_semver_version()

        def version(self):
            return Module._version

        def construct(self, name: str, typ: str, urn: str) -> pulumi.Resource:
            if typ == "google-cloud:securitycenter/v1beta1:OrganizationSource":
                return OrganizationSource(name, pulumi.ResourceOptions(urn=urn))
            elif typ == "google-cloud:securitycenter/v1beta1:OrganizationSourceFinding":
                return OrganizationSourceFinding(name, pulumi.ResourceOptions(urn=urn))
            elif typ == "google-cloud:securitycenter/v1beta1:OrganizationSourceIamPolicy":
                return OrganizationSourceIamPolicy(name, pulumi.ResourceOptions(urn=urn))
            else:
                raise Exception(f"unknown resource type {typ}")
github pulumi / pulumi-google-native / sdk / python / pulumi_google_native / retail / v2alpha / __init__.py View on Github external
def _register_module():
    import pulumi
    from ... import _utilities


    class Module(pulumi.runtime.ResourceModule):
        _version = _utilities.get_semver_version()

        def version(self):
            return Module._version

        def construct(self, name: str, typ: str, urn: str) -> pulumi.Resource:
            if typ == "google-native:retail/v2alpha:Product":
                return Product(name, pulumi.ResourceOptions(urn=urn))
            else:
                raise Exception(f"unknown resource type {typ}")


    _module_instance = Module()
    pulumi.runtime.register_resource_module("google-native", "retail/v2alpha", _module_instance)
github pulumi / pulumi-google-native / sdk / python / pulumi_google_cloud / container / v1 / __init__.py View on Github external
def _register_module():
    import pulumi
    from ... import _utilities


    class Module(pulumi.runtime.ResourceModule):
        _version = _utilities.get_semver_version()

        def version(self):
            return Module._version

        def construct(self, name: str, typ: str, urn: str) -> pulumi.Resource:
            if typ == "google-cloud:container/v1:Cluster":
                return Cluster(name, pulumi.ResourceOptions(urn=urn))
            elif typ == "google-cloud:container/v1:ClusterNodePool":
                return ClusterNodePool(name, pulumi.ResourceOptions(urn=urn))
            else:
                raise Exception(f"unknown resource type {typ}")


    _module_instance = Module()
    pulumi.runtime.register_resource_module("google-cloud", "container/v1", _module_instance)