diff --git a/README.md b/README.md index 38de0f2..63b2ad9 100644 --- a/README.md +++ b/README.md @@ -6,4 +6,6 @@ This Terraform implements the [prerequisites](https://docs.oracle.com/en-us/iaas - Compartments - The recommended Migration and MigrationSecrets [compartments](https://docs.oracle.com/en-us/iaas/Content/cloud-migration/cloud-migration-get-started.htm#cloud-migration-recommendations-compartments). - OCI Vault and Key - The vault used to store [vCenter credentials](https://docs.oracle.com/en-us/iaas/Content/cloud-migration/cloud-migration-remote-agent-appliance.htm#cloud-migration-vsphere-privileges). - Object Storage Bucket - The Object Storage [bucket](https://docs.oracle.com/en-us/iaas/Content/cloud-migration/cloud-migration-understand-vm-replication.htm#cloud-migration-replication-bucket) used for transferring vSphere snapshot data into OCI. -- Mandatory Serivce Policies - The mandatory [service policies](https://docs.oracle.com/en-us/iaas/Content/cloud-migration/cloud-migration-servicepolicies.htm) and assoicated dynamic groups needed for OCM serivce components to function. \ No newline at end of file +- Mandatory Service Policies - The mandatory [service policies](https://docs.oracle.com/en-us/iaas/Content/cloud-migration/cloud-migration-servicepolicies.htm) and associated dynamic groups needed for OCM service components to function. +- Oracle Cloud Bridge Inventory - The [Inventory](https://docs.oracle.com/en-us/iaas/Content/cloud-migration/cloud-migration-inventory.htm) used to store discovered assets for migration. +- Tag Namespace and Tags - The tag namespace and tags used by Oracle Cloud Migrations to keep track of [migrated resources](https://docs.oracle.com/en-us/iaas/Content/cloud-migration/cloud-migration-get-started.htm#cloud-migration-prerequisites-ocm). \ No newline at end of file diff --git a/cloudbridge.tf b/cloudbridge.tf new file mode 100644 index 0000000..bf1fab0 --- /dev/null +++ b/cloudbridge.tf @@ -0,0 +1,7 @@ +## Copyright (c) 2019-2022 Oracle and/or its affiliates. +## Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl. + +resource "oci_cloud_bridge_inventory" "Inventory" { + compartment_id = var.tenancy_ocid + display_name = "Inventory" +} \ No newline at end of file diff --git a/identity.tf b/identity.tf index a520d28..2aec0bb 100644 --- a/identity.tf +++ b/identity.tf @@ -74,8 +74,9 @@ resource "oci_identity_policy" "MigrationServicePolicy" { "Allow dynamic-group ${oci_identity_dynamic_group.MigrationDynamicGroup.name} { CAPACITY_RESERVATION_READ } in tenancy where any { request.operation='GetComputeCapacityReservation' }", "Allow dynamic-group ${oci_identity_dynamic_group.MigrationDynamicGroup.name} { ORGANIZATIONS_SUBSCRIPTION_INSPECT } in tenancy where any { request.operation='ListSubscriptions' }", "Allow dynamic-group ${oci_identity_dynamic_group.MigrationDynamicGroup.name} to read rate-cards in tenancy", - "Allow dynamic-group ${oci_identity_dynamic_group.MigrationDynamicGroup.name} to use metrics in tenancy where target.metrics.namespace='ocb_asset'" - + "Allow dynamic-group ${oci_identity_dynamic_group.MigrationDynamicGroup.name} to use metrics in tenancy where target.metrics.namespace='ocb_asset'", + "Allow dynamic-group ${oci_identity_dynamic_group.MigrationDynamicGroup.name} to read tag-namespaces in tenancy", + "Allow dynamic-group ${oci_identity_dynamic_group.MigrationDynamicGroup.name} to use tag-namespaces in tenancy where target.tag-namespace.name='CloudMigrations'" ] } @@ -160,3 +161,37 @@ resource "oci_identity_policy" "HydrationAgentPolicy" { ] } +resource "oci_identity_tag_namespace" "CloudMigrations" { + name = "CloudMigrations" + description = "Used to track resources created by Oracle Cloud Migrations service." + compartment_id = var.tenancy_ocid +} + +resource "oci_identity_tag" "ServiceUse" { + name = "ServiceUse" + description = "Oracle Cloud Migrations service" + tag_namespace_id = oci_identity_tag_namespace.CloudMigrations.id +} + +resource "oci_identity_tag" "SourceEnvironmentId" { + name = "SourceEnvironmentId" + description = "Source Environment OCID" + tag_namespace_id = oci_identity_tag_namespace.CloudMigrations.id +} +resource "oci_identity_tag" "SourceEnvironmentType" { + name = "SourceEnvironmentType" + description = "Source Environment Type" + tag_namespace_id = oci_identity_tag_namespace.CloudMigrations.id +} + +resource "oci_identity_tag" "SourceAssetId" { + name = "SourceAssetId" + description = "Asset Source OCID" + tag_namespace_id = oci_identity_tag_namespace.CloudMigrations.id +} + +resource "oci_identity_tag" "MigrationProject" { + name = "MigrationProject" + description = "Migration Project OCID" + tag_namespace_id = oci_identity_tag_namespace.CloudMigrations.id +} \ No newline at end of file