oci_cloud_bridge_asset_source
This resource provides the Asset Source resource in Oracle Cloud Infrastructure Cloud Bridge service. Api doc link for the resource: https://docs.oracle.com/iaas/api/#/en/OCB/latest/AssetSource
Example terraform configs related to the resource : https://github.com/oracle/terraform-provider-oci/tree/master/examples/cloudBridge
Creates an asset source.
Example Usage
resource "oci_cloud_bridge_asset_source" "test_asset_source" {
#Required
assets_compartment_id = oci_identity_compartment.test_compartment.id
compartment_id = var.compartment_id
discovery_credentials {
#Required
secret_id = oci_vault_secret.test_secret.id
type = var.asset_source_discovery_credentials_type
}
environment_id = oci_cloud_bridge_environment.test_environment.id
inventory_id = oci_cloud_bridge_inventory.test_inventory.id
type = var.asset_source_type
#Optional
are_historical_metrics_collected = var.asset_source_are_historical_metrics_collected
are_realtime_metrics_collected = var.asset_source_are_realtime_metrics_collected
aws_account_key = var.asset_source_aws_account_key
aws_region = var.asset_source_aws_region
defined_tags = {"Operations.CostCenter"= "42"}
discovery_schedule_id = oci_cloud_bridge_discovery_schedule.test_discovery_schedule.id
display_name = var.asset_source_display_name
environment_type = var.asset_source_environment_type
freeform_tags = {"Department"= "Finance"}
is_cost_information_collected = var.asset_source_is_cost_information_collected
olvm_endpoint = var.asset_source_olvm_endpoint
replication_credentials {
#Required
secret_id = oci_vault_secret.test_secret.id
type = var.asset_source_replication_credentials_type
}
system_tags = var.asset_source_system_tags
vcenter_endpoint = var.asset_source_vcenter_endpoint
}
Argument Reference
The following arguments are supported:
are_historical_metrics_collected- (Optional) (Updatable) Flag indicating whether historical metrics are collected for assets, originating from this asset source.are_realtime_metrics_collected- (Optional) (Updatable) Flag indicating whether real-time metrics are collected for assets, originating from this asset source.assets_compartment_id- (Required) (Updatable) The OCID of the compartment that is going to be used to create assets.aws_account_key- (Required when type=AWS) The key of customer’s aws account to be discovered/migrated.aws_region- (Required when type=AWS) AWS region information, from where the resources are discovered.compartment_id- (Required) (Updatable) The OCID of the compartment for the resource.defined_tags- (Optional) (Updatable) The defined tags associated with this resource, if any. Each key is predefined and scoped to namespaces. For more information, see Resource Tags. Example:{"Operations.CostCenter": "42"}discovery_credentials- (Required) (Updatable) Credentials for an asset source.secret_id- (Required) (Updatable) The OCID of the secret in a vault. If the type of the credentials isBASIC, the secret must contain the username and password in JSON format, which is in the form of{ "username": "<User>", "password": "example-password" }. If the type of the credentials isAPI_KEY, the secret must contain the accessKeyId and secretAccessKey in JSON format, which is in the form of{ "accessKeyId": "<AccessKey>", "secretAccessKey": "<AccessKeyValue>" }.type- (Required) (Updatable) Authentication type
discovery_schedule_id- (Optional) (Updatable) The OCID of the discovery schedule that is going to be attached to the created asset.display_name- (Optional) (Updatable) A user-friendly name for the asset source. Does not have to be unique, and it’s mutable. Avoid entering confidential information. The name is generated by the service if it is not explicitly provided.environment_id- (Required) The OCID of the environment.environment_type- (Optional) (Updatable) Specifies if this is the Source or Destination point for migration - different assets may be discovered depending on setting.freeform_tags- (Optional) (Updatable) The freeform tags associated with this resource, if any. Each tag is a simple key-value pair with no predefined name, type, or namespace/scope. For more information, see Resource Tags. Example:{"Department": "Finance"}inventory_id- (Required) The OCID of the inventory that will contain created assets.is_cost_information_collected- (Applicable when type=AWS) (Updatable) Flag indicating whether cost data collection is enabled for assets, originating from this asset source.olvm_endpoint- (Required when type=OLVM) (Updatable) Endpoint for OLVM asset discovery and replication in the form ofhttps://<host>:<port>replication_credentials- (Optional) (Updatable) Credentials for an asset source.secret_id- (Required) (Updatable) The OCID of the secret in a vault. If the type of the credentials isBASIC, the secret must contain the username and password in JSON format, which is in the form of{ "username": "<User>", "password": "example-password" }. If the type of the credentials isAPI_KEY, the secret must contain the accessKeyId and secretAccessKey in JSON format, which is in the form of{ "accessKeyId": "<AccessKey>", "secretAccessKey": "<AccessKeyValue>" }.type- (Required) (Updatable) Authentication type
system_tags- (Optional) (Updatable) The system tags associated with this resource, if any. The system tags are set by Oracle cloud infrastructure services. Each key is predefined and scoped to namespaces. For more information, see Resource Tags. Example:{orcl-cloud: {free-tier-retain: true}}type- (Required) (Updatable) Asset source type.vcenter_endpoint- (Required when type=VMWARE) (Updatable) Endpoint for VMware asset discovery and replication in the form ofhttps://<host>:<port>/sdk
** 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
Attributes Reference
The following attributes are exported:
are_historical_metrics_collected- Flag indicating whether historical metrics are collected for assets, originating from this asset source.are_realtime_metrics_collected- Flag indicating whether real-time metrics are collected for assets, originating from this asset source.assets_compartment_id- The OCID of the compartment that is going to be used to create assets.aws_account_key- The key of customer’s aws account to be discovered/migrated.aws_region- AWS region information, from where the resources are discovered.compartment_id- The OCID of the compartment for the resource.defined_tags- The defined tags associated with this resource, if any. Each key is predefined and scoped to namespaces. For more information, see Resource Tags. Example:{"Operations.CostCenter": "42"}discovery_credentials- Credentials for an asset source.secret_id- The OCID of the secret in a vault. If the type of the credentials isBASIC, the secret must contain the username and password in JSON format, which is in the form of{ "username": "<User>", "password": "example-password" }. If the type of the credentials isAPI_KEY, the secret must contain the accessKeyId and secretAccessKey in JSON format, which is in the form of{ "accessKeyId": "<AccessKey>", "secretAccessKey": "<AccessKeyValue>" }.type- Authentication type
discovery_schedule_id- The OCID of an attached discovery schedule.display_name- A user-friendly name for the asset source. Does not have to be unique, and it’s mutable. Avoid entering confidential information.environment_id- The OCID of the environment.environment_type- Specifies if this is the Source or Destination point for migration - different assets may be discovered depending on setting.freeform_tags- The freeform tags associated with this resource, if any. Each tag is a simple key-value pair with no predefined name, type, or namespace/scope. For more information, see Resource Tags. Example:{"Department": "Finance"}id- The OCID of the resource.inventory_id- The OCID of the inventory that will contain created assets.is_cost_information_collected- Flag indicating whether cost data collection is enabled for assets, originating from this asset source.lifecycle_details- The detailed state of the asset source.olvm_endpoint- Endpoint for OLVM asset discovery and replication in the form ofhttps://<host>:<port>replication_credentials- Credentials for an asset source.secret_id- The OCID of the secret in a vault. If the type of the credentials isBASIC, the secret must contain the username and password in JSON format, which is in the form of{ "username": "<User>", "password": "example-password" }. If the type of the credentials isAPI_KEY, the secret must contain the accessKeyId and secretAccessKey in JSON format, which is in the form of{ "accessKeyId": "<AccessKey>", "secretAccessKey": "<AccessKeyValue>" }.type- Authentication type
state- The current state of the asset source.system_tags- The system tags associated with this resource, if any. The system tags are set by Oracle cloud infrastructure services. Each key is predefined and scoped to namespaces. For more information, see Resource Tags. Example:{orcl-cloud: {free-tier-retain: true}}time_created- The time when the asset source was created in the RFC3339 format.time_updated- The point in time that the asset source was last updated in the RFC3339 format.type- The type of asset source. Indicates external origin of the assets that are read by assigning this asset source.vcenter_endpoint- Endpoint for VMware asset discovery and replication in the form ofhttps://<host>:<port>/sdk
Timeouts
The timeouts block allows you to specify timeouts for certain operations:
* create - (Defaults to 20 minutes), when creating the Asset Source
* update - (Defaults to 20 minutes), when updating the Asset Source
* delete - (Defaults to 20 minutes), when destroying the Asset Source
Import
AssetSources can be imported using the id, e.g.
$ terraform import oci_cloud_bridge_asset_source.test_asset_source "id"