import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * This resource provides the Dr Protection Group resource in Oracle Cloud Infrastructure Disaster Recovery service. * Api doc link for the resource: https://docs.oracle.com/iaas/api/#/en/disaster-recovery/latest/DrProtectionGroup * * Example terraform configs related to the resource : https://github.com/oracle/terraform-provider-oci/tree/master/examples/disaster_recovery * * Create a DR protection group. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as oci from "@pulumi/oci"; * * const config = new pulumi.Config(); * const disassociateTrigger = config.getNumber("disassociateTrigger") || 0; * const testDrProtectionGroup = new oci.disasterrecovery.DrProtectionGroup("test_dr_protection_group", { * compartmentId: compartmentId, * displayName: drProtectionGroupDisplayName, * logLocation: { * bucket: drProtectionGroupLogLocationBucket, * namespace: drProtectionGroupLogLocationNamespace, * }, * association: { * role: drProtectionGroupAssociationRole, * peerId: drProtectionGroupAssociationPeerId, * peerRegion: drProtectionGroupAssociationPeerRegion, * }, * definedTags: { * "Operations.CostCenter": "42", * }, * freeformTags: { * Department: "Finance", * }, * disassociateTrigger: disassociateTrigger, * members: [{ * memberId: drProtectionGroupMembersMemberId, * memberType: drProtectionGroupMembersMemberType, * autonomousDatabaseStandbyTypeForDrDrills: drProtectionGroupMembersAutonomousDatabaseStandbyTypeForDrDrills, * backendSetMappings: [{ * destinationBackendSetName: testBackendSet.name, * isBackendSetForNonMovable: drProtectionGroupMembersBackendSetMappingsIsBackendSetForNonMovable === "true", * sourceBackendSetName: testBackendSet.name, * }], * backupConfig: { * backupSchedule: drProtectionGroupMembersBackupConfigBackupSchedule, * excludeNamespaces: drProtectionGroupMembersBackupConfigExcludeNamespaces, * imageReplicationVaultSecretId: testSecret.id, * maxNumberOfBackupsRetained: Number(drProtectionGroupMembersBackupConfigMaxNumberOfBackupsRetained), * namespaces: drProtectionGroupMembersBackupConfigNamespaces, * replicateImages: drProtectionGroupMembersBackupConfigReplicateImages, * }, * backupLocation: { * bucket: drProtectionGroupMembersBackupLocationBucket, * namespace: drProtectionGroupMembersBackupLocationNamespace, * }, * blockVolumeAttachAndMountOperations: { * attachments: [{ * blockVolumeId: testVolume.id, * volumeAttachmentReferenceInstanceId: testInstance.id, * }], * mounts: [{ * mountPoint: drProtectionGroupMembersBlockVolumeAttachAndMountOperationsMountsMountPoint, * }], * }, * blockVolumeOperations: [{ * attachmentDetails: { * volumeAttachmentReferenceInstanceId: testInstance.id, * }, * blockVolumeId: testVolume.id, * mountDetails: { * mountPoint: drProtectionGroupMembersBlockVolumeOperationsMountDetailsMountPoint, * }, * }], * bucket: drProtectionGroupMembersBucket, * commonDestinationKey: { * encryptionKeyId: testKey.id, * vaultId: testVault.id, * }, * connectionStringType: drProtectionGroupMembersConnectionStringType, * dbSystemAdminUserDetails: { * passwordVaultSecretId: testSecret.id, * username: drProtectionGroupMembersDbSystemAdminUserDetailsUsername, * }, * dbSystemReplicationUserDetails: { * passwordVaultSecretId: testSecret.id, * username: drProtectionGroupMembersDbSystemReplicationUserDetailsUsername, * }, * destinationAvailabilityDomain: drProtectionGroupMembersDestinationAvailabilityDomain, * destinationBackupPolicyId: testPolicy.id, * destinationCapacityReservationId: destinationCapacityReservationId, * destinationCompartmentId: testCompartment.id, * destinationDedicatedVmHostId: testDedicatedVmHost.id, * destinationEncryptionKey: { * encryptionKeyId: testKey.id, * vaultId: testVault.id, * }, * destinationLoadBalancerId: testLoadBalancer.id, * destinationNetworkLoadBalancerId: testNetworkLoadBalancer.id, * destinationSnapshotPolicyId: testPolicy.id, * exportMappings: [{ * destinationMountTargetId: testMountTarget.id, * exportId: testExport.id, * }], * fileSystemOperations: [{ * exportPath: drProtectionGroupMembersFileSystemOperationsExportPath, * mountDetails: { * mountTargetId: testMountTarget.id, * }, * mountPoint: drProtectionGroupMembersFileSystemOperationsMountPoint, * mountTargetId: testMountTarget.id, * unmountDetails: { * mountTargetId: testMountTarget.id, * }, * }], * gtidReconciliationTimeout: Number(drProtectionGroupMembersGtidReconciliationTimeout), * isContinueOnGtidReconciliationTimeout: drProtectionGroupMembersIsContinueOnGtidReconciliationTimeout === "true", * isMovable: drProtectionGroupMembersIsMovable === "true", * isRetainFaultDomain: drProtectionGroupMembersIsRetainFaultDomain === "true", * isStartStopEnabled: drProtectionGroupMembersIsStartStopEnabled === "true", * jumpHostId: testJumpHost.id, * loadBalancerMappings: [{ * destinationLoadBalancerId: testLoadBalancer.id, * sourceLoadBalancerId: testLoadBalancer.id, * }], * managedNodePoolConfigs: [{ * id: drProtectionGroupMembersManagedNodePoolConfigsId, * maximum: Number(drProtectionGroupMembersManagedNodePoolConfigsMaximum), * minimum: Number(drProtectionGroupMembersManagedNodePoolConfigsMinimum), * }], * namespace: drProtectionGroupMembersNamespace, * passwordVaultSecretId: passwordVaultSecretId, * networkLoadBalancerMappings: [{ * destinationNetworkLoadBalancerId: testNetworkLoadBalancer.id, * sourceNetworkLoadBalancerId: testNetworkLoadBalancer.id, * }], * peerClusterId: testCluster.id, * peerDbSystemId: testDbSystem.id, * resourceModifierMappings: [{ * configMap: drProtectionGroupMembersResourceModifierMappingsConfigMap, * namespace: drProtectionGroupMembersResourceModifierMappingsNamespace, * }], * sourceVolumeToDestinationEncryptionKeyMappings: [{ * destinationEncryptionKey: { * encryptionKeyId: testKey.id, * vaultId: testVault.id, * }, * sourceVolumeId: testVolume.id, * }], * vaultMappings: [{ * destinationVaultId: testVault.id, * sourceVaultId: testVault.id, * }], * virtualNodePoolConfigs: [{ * id: drProtectionGroupMembersVirtualNodePoolConfigsId, * maximum: Number(drProtectionGroupMembersVirtualNodePoolConfigsMaximum), * minimum: Number(drProtectionGroupMembersVirtualNodePoolConfigsMinimum), * }], * vnicMappings: [ * { * destinationNsgIdLists: drProtectionGroupMembersVnicMappingDestinationNsgIdList, * destinationPrimaryPrivateIpAddress: drProtectionGroupMembersVnicMappingDestinationPrimaryPrivateIpAddress, * destinationPrimaryPrivateIpHostnameLabel: drProtectionGroupMembersVnicMappingDestinationPrimaryPrivateIpHostnameLabel, * destinationSubnetId: testSubnet.id, * sourceVnicId: testVnic.id, * }, * { * destinationNsgIdLists: drProtectionGroupMembersVnicMappingsDestinationNsgIdList, * destinationPrimaryPrivateIpAddress: drProtectionGroupMembersVnicMappingsDestinationPrimaryPrivateIpAddress, * destinationPrimaryPrivateIpHostnameLabel: drProtectionGroupMembersVnicMappingsDestinationPrimaryPrivateIpHostnameLabel, * destinationReservedPublicIpId: testPublicIp.id, * destinationSubnetId: testSubnet.id, * sourceVnicId: testVnic.id, * }, * ], * }], * }); * ``` * * ## Create * * Create DR Protection Group resource with a default value of `disassociateTrigger` property, e.g. * * ## Delete * * Disassociate DR Protection Group (if associated) before deleting it. Increment value of `disassociateTrigger` property to trigger Disassociate, e.g. * * ## Import * * DrProtectionGroups can be imported using the `id`, e.g. * * ```sh * $ pulumi import oci:DisasterRecovery/drProtectionGroup:DrProtectionGroup test_dr_protection_group "id" * ``` */ export declare class DrProtectionGroup extends pulumi.CustomResource { /** * Get an existing DrProtectionGroup resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: DrProtectionGroupState, opts?: pulumi.CustomResourceOptions): DrProtectionGroup; /** * Returns true if the given object is an instance of DrProtectionGroup. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is DrProtectionGroup; /** * The details for associating a DR protection group with a peer DR protection group. */ readonly association: pulumi.Output; /** * (Updatable) The OCID of the compartment in which to create the DR protection group. Example: `ocid1.compartment.oc1..uniqueID` */ readonly compartmentId: pulumi.Output; /** * (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"Operations.CostCenter": "42"}` */ readonly definedTags: pulumi.Output<{ [key: string]: string; }>; /** * (Updatable) An optional property when incremented triggers Disassociate. Could be set to any integer value. * * ** IMPORTANT ** * Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values */ readonly disassociateTrigger: pulumi.Output; /** * (Updatable) The display name of the DR protection group. Example: `EBS PHX Group` */ readonly displayName: pulumi.Output; /** * (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"Department": "Finance"}` */ readonly freeformTags: pulumi.Output<{ [key: string]: string; }>; /** * A message describing the DR protection group's current state in more detail. */ readonly lifeCycleDetails: pulumi.Output; /** * The current sub-state of the DR protection group. */ readonly lifecycleSubState: pulumi.Output; /** * (Updatable) The details for creating an object storage log location for a DR protection group. */ readonly logLocation: pulumi.Output; /** * (Updatable) A list of DR protection group members. */ readonly members: pulumi.Output; /** * The OCID of the peer DR protection group. Example: `ocid1.drprotectiongroup.oc1..uniqueID` */ readonly peerId: pulumi.Output; /** * The region of the peer DR protection group. Example: `us-ashburn-1` */ readonly peerRegion: pulumi.Output; /** * The role of the DR protection group. */ readonly role: pulumi.Output; /** * The current state of the DR protection group. */ readonly state: pulumi.Output; /** * Usage of system tag keys. These predefined keys are scoped to namespaces. Example: `{"orcl-cloud.free-tier-retained": "true"}` */ readonly systemTags: pulumi.Output<{ [key: string]: string; }>; /** * The date and time the DR protection group was created. An RFC3339 formatted datetime string. Example: `2019-03-29T09:36:42Z` */ readonly timeCreated: pulumi.Output; /** * The date and time the DR protection group was updated. An RFC3339 formatted datetime string. Example: `2019-03-29T09:36:42Z` */ readonly timeUpdated: pulumi.Output; /** * Create a DrProtectionGroup resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: DrProtectionGroupArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering DrProtectionGroup resources. */ export interface DrProtectionGroupState { /** * The details for associating a DR protection group with a peer DR protection group. */ association?: pulumi.Input; /** * (Updatable) The OCID of the compartment in which to create the DR protection group. Example: `ocid1.compartment.oc1..uniqueID` */ compartmentId?: pulumi.Input; /** * (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"Operations.CostCenter": "42"}` */ definedTags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * (Updatable) An optional property when incremented triggers Disassociate. Could be set to any integer value. * * ** IMPORTANT ** * Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values */ disassociateTrigger?: pulumi.Input; /** * (Updatable) The display name of the DR protection group. Example: `EBS PHX Group` */ displayName?: pulumi.Input; /** * (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"Department": "Finance"}` */ freeformTags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * A message describing the DR protection group's current state in more detail. */ lifeCycleDetails?: pulumi.Input; /** * The current sub-state of the DR protection group. */ lifecycleSubState?: pulumi.Input; /** * (Updatable) The details for creating an object storage log location for a DR protection group. */ logLocation?: pulumi.Input; /** * (Updatable) A list of DR protection group members. */ members?: pulumi.Input[] | undefined>; /** * The OCID of the peer DR protection group. Example: `ocid1.drprotectiongroup.oc1..uniqueID` */ peerId?: pulumi.Input; /** * The region of the peer DR protection group. Example: `us-ashburn-1` */ peerRegion?: pulumi.Input; /** * The role of the DR protection group. */ role?: pulumi.Input; /** * The current state of the DR protection group. */ state?: pulumi.Input; /** * Usage of system tag keys. These predefined keys are scoped to namespaces. Example: `{"orcl-cloud.free-tier-retained": "true"}` */ systemTags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * The date and time the DR protection group was created. An RFC3339 formatted datetime string. Example: `2019-03-29T09:36:42Z` */ timeCreated?: pulumi.Input; /** * The date and time the DR protection group was updated. An RFC3339 formatted datetime string. Example: `2019-03-29T09:36:42Z` */ timeUpdated?: pulumi.Input; } /** * The set of arguments for constructing a DrProtectionGroup resource. */ export interface DrProtectionGroupArgs { /** * The details for associating a DR protection group with a peer DR protection group. */ association?: pulumi.Input; /** * (Updatable) The OCID of the compartment in which to create the DR protection group. Example: `ocid1.compartment.oc1..uniqueID` */ compartmentId: pulumi.Input; /** * (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"Operations.CostCenter": "42"}` */ definedTags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * (Updatable) An optional property when incremented triggers Disassociate. Could be set to any integer value. * * ** IMPORTANT ** * Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values */ disassociateTrigger?: pulumi.Input; /** * (Updatable) The display name of the DR protection group. Example: `EBS PHX Group` */ displayName: pulumi.Input; /** * (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"Department": "Finance"}` */ freeformTags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * (Updatable) The details for creating an object storage log location for a DR protection group. */ logLocation: pulumi.Input; /** * (Updatable) A list of DR protection group members. */ members?: pulumi.Input[] | undefined>; } //# sourceMappingURL=drProtectionGroup.d.ts.map