1. Packages
  2. Hsdp Provider
  3. API Docs
  4. CdrOrg
hsdp 0.65.3 published on Tuesday, Apr 15, 2025 by philips-software

hsdp.CdrOrg

Explore with Pulumi AI

hsdp logo
hsdp 0.65.3 published on Tuesday, Apr 15, 2025 by philips-software

    Provides a resource for onboarding HSDP CDR organizations. This resource provides limited management of the onboarded FHIR organization.

    Example Usage

    The following example creates and onboards a CDR FHIR organization

    import * as pulumi from "@pulumi/pulumi";
    import * as hsdp from "@pulumi/hsdp";
    
    const sandbox = hsdp.getCdrFhirStore({
        baseUrl: "https://cdr-stu3-sandbox.hsdp.io/store/fhir",
        fhirOrgId: _var.root_org_id,
    });
    // Onboard the root Organization onto CDR
    const rootOrg = new hsdp.CdrOrg("rootOrg", {
        fhirStore: sandbox.then(sandbox => sandbox.endpoint),
        orgId: _var.root_org_id,
        version: "r4",
    });
    // Onboard the Hospital as a sub org to the root ORG
    const hospital = new hsdp.CdrOrg("hospital", {
        fhirStore: sandbox.then(sandbox => sandbox.endpoint),
        orgId: _var.sub_org_id,
        version: "r4",
        partOf: _var.root_org_id,
        purgeDelete: false,
    });
    
    import pulumi
    import pulumi_hsdp as hsdp
    
    sandbox = hsdp.get_cdr_fhir_store(base_url="https://cdr-stu3-sandbox.hsdp.io/store/fhir",
        fhir_org_id=var["root_org_id"])
    # Onboard the root Organization onto CDR
    root_org = hsdp.CdrOrg("rootOrg",
        fhir_store=sandbox.endpoint,
        org_id=var["root_org_id"],
        version="r4")
    # Onboard the Hospital as a sub org to the root ORG
    hospital = hsdp.CdrOrg("hospital",
        fhir_store=sandbox.endpoint,
        org_id=var["sub_org_id"],
        version="r4",
        part_of=var["root_org_id"],
        purge_delete=False)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/hsdp/hsdp"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		sandbox, err := hsdp.GetCdrFhirStore(ctx, &hsdp.GetCdrFhirStoreArgs{
    			BaseUrl:   "https://cdr-stu3-sandbox.hsdp.io/store/fhir",
    			FhirOrgId: _var.Root_org_id,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		// Onboard the root Organization onto CDR
    		_, err = hsdp.NewCdrOrg(ctx, "rootOrg", &hsdp.CdrOrgArgs{
    			FhirStore: pulumi.String(sandbox.Endpoint),
    			OrgId:     pulumi.Any(_var.Root_org_id),
    			Version:   pulumi.String("r4"),
    		})
    		if err != nil {
    			return err
    		}
    		// Onboard the Hospital as a sub org to the root ORG
    		_, err = hsdp.NewCdrOrg(ctx, "hospital", &hsdp.CdrOrgArgs{
    			FhirStore:   pulumi.String(sandbox.Endpoint),
    			OrgId:       pulumi.Any(_var.Sub_org_id),
    			Version:     pulumi.String("r4"),
    			PartOf:      pulumi.Any(_var.Root_org_id),
    			PurgeDelete: pulumi.Bool(false),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Hsdp = Pulumi.Hsdp;
    
    return await Deployment.RunAsync(() => 
    {
        var sandbox = Hsdp.GetCdrFhirStore.Invoke(new()
        {
            BaseUrl = "https://cdr-stu3-sandbox.hsdp.io/store/fhir",
            FhirOrgId = @var.Root_org_id,
        });
    
        // Onboard the root Organization onto CDR
        var rootOrg = new Hsdp.CdrOrg("rootOrg", new()
        {
            FhirStore = sandbox.Apply(getCdrFhirStoreResult => getCdrFhirStoreResult.Endpoint),
            OrgId = @var.Root_org_id,
            Version = "r4",
        });
    
        // Onboard the Hospital as a sub org to the root ORG
        var hospital = new Hsdp.CdrOrg("hospital", new()
        {
            FhirStore = sandbox.Apply(getCdrFhirStoreResult => getCdrFhirStoreResult.Endpoint),
            OrgId = @var.Sub_org_id,
            Version = "r4",
            PartOf = @var.Root_org_id,
            PurgeDelete = false,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.hsdp.HsdpFunctions;
    import com.pulumi.hsdp.inputs.GetCdrFhirStoreArgs;
    import com.pulumi.hsdp.CdrOrg;
    import com.pulumi.hsdp.CdrOrgArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var sandbox = HsdpFunctions.getCdrFhirStore(GetCdrFhirStoreArgs.builder()
                .baseUrl("https://cdr-stu3-sandbox.hsdp.io/store/fhir")
                .fhirOrgId(var_.root_org_id())
                .build());
    
            // Onboard the root Organization onto CDR
            var rootOrg = new CdrOrg("rootOrg", CdrOrgArgs.builder()
                .fhirStore(sandbox.applyValue(getCdrFhirStoreResult -> getCdrFhirStoreResult.endpoint()))
                .orgId(var_.root_org_id())
                .version("r4")
                .build());
    
            // Onboard the Hospital as a sub org to the root ORG
            var hospital = new CdrOrg("hospital", CdrOrgArgs.builder()
                .fhirStore(sandbox.applyValue(getCdrFhirStoreResult -> getCdrFhirStoreResult.endpoint()))
                .orgId(var_.sub_org_id())
                .version("r4")
                .partOf(var_.root_org_id())
                .purgeDelete(false)
                .build());
    
        }
    }
    
    resources:
      # Onboard the root Organization onto CDR
      rootOrg:
        type: hsdp:CdrOrg
        properties:
          fhirStore: ${sandbox.endpoint}
          orgId: ${var.root_org_id}
          version: r4
      # Onboard the Hospital as a sub org to the root ORG
      hospital:
        type: hsdp:CdrOrg
        properties:
          fhirStore: ${sandbox.endpoint}
          orgId: ${var.sub_org_id}
          # Set up this org to use FHIR R4
          version: r4
          # This is a sub org of the root ORG
          partOf: ${var.root_org_id}
          purgeDelete: false
    variables:
      sandbox:
        fn::invoke:
          function: hsdp:getCdrFhirStore
          arguments:
            baseUrl: https://cdr-stu3-sandbox.hsdp.io/store/fhir
            fhirOrgId: ${var.root_org_id}
    

    Create CdrOrg Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new CdrOrg(name: string, args: CdrOrgArgs, opts?: CustomResourceOptions);
    @overload
    def CdrOrg(resource_name: str,
               args: CdrOrgArgs,
               opts: Optional[ResourceOptions] = None)
    
    @overload
    def CdrOrg(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               fhir_store: Optional[str] = None,
               org_id: Optional[str] = None,
               cdr_org_id: Optional[str] = None,
               name: Optional[str] = None,
               part_of: Optional[str] = None,
               purge_delete: Optional[bool] = None,
               version: Optional[str] = None)
    func NewCdrOrg(ctx *Context, name string, args CdrOrgArgs, opts ...ResourceOption) (*CdrOrg, error)
    public CdrOrg(string name, CdrOrgArgs args, CustomResourceOptions? opts = null)
    public CdrOrg(String name, CdrOrgArgs args)
    public CdrOrg(String name, CdrOrgArgs args, CustomResourceOptions options)
    
    type: hsdp:CdrOrg
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args CdrOrgArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args CdrOrgArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args CdrOrgArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CdrOrgArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CdrOrgArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var cdrOrgResource = new Hsdp.CdrOrg("cdrOrgResource", new()
    {
        FhirStore = "string",
        OrgId = "string",
        CdrOrgId = "string",
        Name = "string",
        PartOf = "string",
        PurgeDelete = false,
        Version = "string",
    });
    
    example, err := hsdp.NewCdrOrg(ctx, "cdrOrgResource", &hsdp.CdrOrgArgs{
    	FhirStore:   pulumi.String("string"),
    	OrgId:       pulumi.String("string"),
    	CdrOrgId:    pulumi.String("string"),
    	Name:        pulumi.String("string"),
    	PartOf:      pulumi.String("string"),
    	PurgeDelete: pulumi.Bool(false),
    	Version:     pulumi.String("string"),
    })
    
    var cdrOrgResource = new CdrOrg("cdrOrgResource", CdrOrgArgs.builder()
        .fhirStore("string")
        .orgId("string")
        .cdrOrgId("string")
        .name("string")
        .partOf("string")
        .purgeDelete(false)
        .version("string")
        .build());
    
    cdr_org_resource = hsdp.CdrOrg("cdrOrgResource",
        fhir_store="string",
        org_id="string",
        cdr_org_id="string",
        name="string",
        part_of="string",
        purge_delete=False,
        version="string")
    
    const cdrOrgResource = new hsdp.CdrOrg("cdrOrgResource", {
        fhirStore: "string",
        orgId: "string",
        cdrOrgId: "string",
        name: "string",
        partOf: "string",
        purgeDelete: false,
        version: "string",
    });
    
    type: hsdp:CdrOrg
    properties:
        cdrOrgId: string
        fhirStore: string
        name: string
        orgId: string
        partOf: string
        purgeDelete: false
        version: string
    

    CdrOrg Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The CdrOrg resource accepts the following input properties:

    FhirStore string
    The CDR FHIR store to use
    OrgId string
    The Org ID (GUID) under which to onboard. Usually same as IAM Org ID
    CdrOrgId string
    The GUID of the organization
    Name string
    The name of the FHIR Org
    PartOf string
    The parent Organization ID (GUID) this Org is part of
    PurgeDelete bool

    If set to true, when the resource is destroyed the provider will purge all FHIR resources associated with the Organization. The ORGANIZATION.PURGE IAM permission is required for this to work. Default: false

    !> Only use purge_delete = true when you are sure recursive deletion of FHIR resources under the Organization is acceptable for the given deployment.

    !> Switching FHIR versions causes the resource to be replaced, so be careful with this.

    Version string
    The FHIR version to use. Options [ stu3 | r4 ]. Default is stu3
    FhirStore string
    The CDR FHIR store to use
    OrgId string
    The Org ID (GUID) under which to onboard. Usually same as IAM Org ID
    CdrOrgId string
    The GUID of the organization
    Name string
    The name of the FHIR Org
    PartOf string
    The parent Organization ID (GUID) this Org is part of
    PurgeDelete bool

    If set to true, when the resource is destroyed the provider will purge all FHIR resources associated with the Organization. The ORGANIZATION.PURGE IAM permission is required for this to work. Default: false

    !> Only use purge_delete = true when you are sure recursive deletion of FHIR resources under the Organization is acceptable for the given deployment.

    !> Switching FHIR versions causes the resource to be replaced, so be careful with this.

    Version string
    The FHIR version to use. Options [ stu3 | r4 ]. Default is stu3
    fhirStore String
    The CDR FHIR store to use
    orgId String
    The Org ID (GUID) under which to onboard. Usually same as IAM Org ID
    cdrOrgId String
    The GUID of the organization
    name String
    The name of the FHIR Org
    partOf String
    The parent Organization ID (GUID) this Org is part of
    purgeDelete Boolean

    If set to true, when the resource is destroyed the provider will purge all FHIR resources associated with the Organization. The ORGANIZATION.PURGE IAM permission is required for this to work. Default: false

    !> Only use purge_delete = true when you are sure recursive deletion of FHIR resources under the Organization is acceptable for the given deployment.

    !> Switching FHIR versions causes the resource to be replaced, so be careful with this.

    version String
    The FHIR version to use. Options [ stu3 | r4 ]. Default is stu3
    fhirStore string
    The CDR FHIR store to use
    orgId string
    The Org ID (GUID) under which to onboard. Usually same as IAM Org ID
    cdrOrgId string
    The GUID of the organization
    name string
    The name of the FHIR Org
    partOf string
    The parent Organization ID (GUID) this Org is part of
    purgeDelete boolean

    If set to true, when the resource is destroyed the provider will purge all FHIR resources associated with the Organization. The ORGANIZATION.PURGE IAM permission is required for this to work. Default: false

    !> Only use purge_delete = true when you are sure recursive deletion of FHIR resources under the Organization is acceptable for the given deployment.

    !> Switching FHIR versions causes the resource to be replaced, so be careful with this.

    version string
    The FHIR version to use. Options [ stu3 | r4 ]. Default is stu3
    fhir_store str
    The CDR FHIR store to use
    org_id str
    The Org ID (GUID) under which to onboard. Usually same as IAM Org ID
    cdr_org_id str
    The GUID of the organization
    name str
    The name of the FHIR Org
    part_of str
    The parent Organization ID (GUID) this Org is part of
    purge_delete bool

    If set to true, when the resource is destroyed the provider will purge all FHIR resources associated with the Organization. The ORGANIZATION.PURGE IAM permission is required for this to work. Default: false

    !> Only use purge_delete = true when you are sure recursive deletion of FHIR resources under the Organization is acceptable for the given deployment.

    !> Switching FHIR versions causes the resource to be replaced, so be careful with this.

    version str
    The FHIR version to use. Options [ stu3 | r4 ]. Default is stu3
    fhirStore String
    The CDR FHIR store to use
    orgId String
    The Org ID (GUID) under which to onboard. Usually same as IAM Org ID
    cdrOrgId String
    The GUID of the organization
    name String
    The name of the FHIR Org
    partOf String
    The parent Organization ID (GUID) this Org is part of
    purgeDelete Boolean

    If set to true, when the resource is destroyed the provider will purge all FHIR resources associated with the Organization. The ORGANIZATION.PURGE IAM permission is required for this to work. Default: false

    !> Only use purge_delete = true when you are sure recursive deletion of FHIR resources under the Organization is acceptable for the given deployment.

    !> Switching FHIR versions causes the resource to be replaced, so be careful with this.

    version String
    The FHIR version to use. Options [ stu3 | r4 ]. Default is stu3

    Outputs

    All input properties are implicitly available as output properties. Additionally, the CdrOrg resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing CdrOrg Resource

    Get an existing CdrOrg resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: CdrOrgState, opts?: CustomResourceOptions): CdrOrg
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cdr_org_id: Optional[str] = None,
            fhir_store: Optional[str] = None,
            name: Optional[str] = None,
            org_id: Optional[str] = None,
            part_of: Optional[str] = None,
            purge_delete: Optional[bool] = None,
            version: Optional[str] = None) -> CdrOrg
    func GetCdrOrg(ctx *Context, name string, id IDInput, state *CdrOrgState, opts ...ResourceOption) (*CdrOrg, error)
    public static CdrOrg Get(string name, Input<string> id, CdrOrgState? state, CustomResourceOptions? opts = null)
    public static CdrOrg get(String name, Output<String> id, CdrOrgState state, CustomResourceOptions options)
    resources:  _:    type: hsdp:CdrOrg    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    CdrOrgId string
    The GUID of the organization
    FhirStore string
    The CDR FHIR store to use
    Name string
    The name of the FHIR Org
    OrgId string
    The Org ID (GUID) under which to onboard. Usually same as IAM Org ID
    PartOf string
    The parent Organization ID (GUID) this Org is part of
    PurgeDelete bool

    If set to true, when the resource is destroyed the provider will purge all FHIR resources associated with the Organization. The ORGANIZATION.PURGE IAM permission is required for this to work. Default: false

    !> Only use purge_delete = true when you are sure recursive deletion of FHIR resources under the Organization is acceptable for the given deployment.

    !> Switching FHIR versions causes the resource to be replaced, so be careful with this.

    Version string
    The FHIR version to use. Options [ stu3 | r4 ]. Default is stu3
    CdrOrgId string
    The GUID of the organization
    FhirStore string
    The CDR FHIR store to use
    Name string
    The name of the FHIR Org
    OrgId string
    The Org ID (GUID) under which to onboard. Usually same as IAM Org ID
    PartOf string
    The parent Organization ID (GUID) this Org is part of
    PurgeDelete bool

    If set to true, when the resource is destroyed the provider will purge all FHIR resources associated with the Organization. The ORGANIZATION.PURGE IAM permission is required for this to work. Default: false

    !> Only use purge_delete = true when you are sure recursive deletion of FHIR resources under the Organization is acceptable for the given deployment.

    !> Switching FHIR versions causes the resource to be replaced, so be careful with this.

    Version string
    The FHIR version to use. Options [ stu3 | r4 ]. Default is stu3
    cdrOrgId String
    The GUID of the organization
    fhirStore String
    The CDR FHIR store to use
    name String
    The name of the FHIR Org
    orgId String
    The Org ID (GUID) under which to onboard. Usually same as IAM Org ID
    partOf String
    The parent Organization ID (GUID) this Org is part of
    purgeDelete Boolean

    If set to true, when the resource is destroyed the provider will purge all FHIR resources associated with the Organization. The ORGANIZATION.PURGE IAM permission is required for this to work. Default: false

    !> Only use purge_delete = true when you are sure recursive deletion of FHIR resources under the Organization is acceptable for the given deployment.

    !> Switching FHIR versions causes the resource to be replaced, so be careful with this.

    version String
    The FHIR version to use. Options [ stu3 | r4 ]. Default is stu3
    cdrOrgId string
    The GUID of the organization
    fhirStore string
    The CDR FHIR store to use
    name string
    The name of the FHIR Org
    orgId string
    The Org ID (GUID) under which to onboard. Usually same as IAM Org ID
    partOf string
    The parent Organization ID (GUID) this Org is part of
    purgeDelete boolean

    If set to true, when the resource is destroyed the provider will purge all FHIR resources associated with the Organization. The ORGANIZATION.PURGE IAM permission is required for this to work. Default: false

    !> Only use purge_delete = true when you are sure recursive deletion of FHIR resources under the Organization is acceptable for the given deployment.

    !> Switching FHIR versions causes the resource to be replaced, so be careful with this.

    version string
    The FHIR version to use. Options [ stu3 | r4 ]. Default is stu3
    cdr_org_id str
    The GUID of the organization
    fhir_store str
    The CDR FHIR store to use
    name str
    The name of the FHIR Org
    org_id str
    The Org ID (GUID) under which to onboard. Usually same as IAM Org ID
    part_of str
    The parent Organization ID (GUID) this Org is part of
    purge_delete bool

    If set to true, when the resource is destroyed the provider will purge all FHIR resources associated with the Organization. The ORGANIZATION.PURGE IAM permission is required for this to work. Default: false

    !> Only use purge_delete = true when you are sure recursive deletion of FHIR resources under the Organization is acceptable for the given deployment.

    !> Switching FHIR versions causes the resource to be replaced, so be careful with this.

    version str
    The FHIR version to use. Options [ stu3 | r4 ]. Default is stu3
    cdrOrgId String
    The GUID of the organization
    fhirStore String
    The CDR FHIR store to use
    name String
    The name of the FHIR Org
    orgId String
    The Org ID (GUID) under which to onboard. Usually same as IAM Org ID
    partOf String
    The parent Organization ID (GUID) this Org is part of
    purgeDelete Boolean

    If set to true, when the resource is destroyed the provider will purge all FHIR resources associated with the Organization. The ORGANIZATION.PURGE IAM permission is required for this to work. Default: false

    !> Only use purge_delete = true when you are sure recursive deletion of FHIR resources under the Organization is acceptable for the given deployment.

    !> Switching FHIR versions causes the resource to be replaced, so be careful with this.

    version String
    The FHIR version to use. Options [ stu3 | r4 ]. Default is stu3

    Import

    $ pulumi import hsdp:index/cdrOrg:CdrOrg An existing Organization can be imported using `fhir_store,org_id,fhir_version`, e.g.
    

    bash

    $ pulumi import hsdp:index/cdrOrg:CdrOrg myorg https://cdr-stu3-sandbox.domain.com/store/fhir/fhir-root-org-guid,fhir-org-guid,r4
    

    ~> The import string must consist of 3 comma separated values

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    hsdp philips-software/terraform-provider-hsdp
    License
    Notes
    This Pulumi package is based on the hsdp Terraform Provider.
    hsdp logo
    hsdp 0.65.3 published on Tuesday, Apr 15, 2025 by philips-software