oci_management_agent_named_credential

This resource provides the Named Credential resource in Oracle Cloud Infrastructure Management Agent service.

Named credential creation request to given Management Agent.

Example Usage

resource "oci_management_agent_named_credential" "test_named_credential" {
	#Required
	management_agent_id = oci_management_agent_management_agent.test_management_agent.id
	name = var.named_credential_name
	properties {
		#Required
		name = var.named_credential_properties_name
		value = var.named_credential_properties_value
		value_category = var.named_credential_properties_value_category
	}
	properties {
		#Optional
		name = var.named_credential_properties_name2
		value = var.named_credential_properties_value2
		value_category = var.named_credential_properties_value_category2
	}
	type = var.named_credential_type

	#Optional
	defined_tags = {"foo-namespace.bar-key"= "value"}
	description = var.named_credential_description
	freeform_tags = {"bar-key"= "value"}
}

resource "oci_management_agent_named_credential" "example_named_credential" {
	#Required
	management_agent_id = oci_management_agent_management_agent.test_management_agent.id
	name = "Example1"
	properties {
		name = "DBUserName"
		value = var.vault_secret_id
		value_category = "SECRET_IDENTIFIER"
	}
	properties {
		name = "DBPassword"
		value = var.vault_secret2_id
		value_category = "SECRET_IDENTIFIER"
	}
	type = "DBCREDS"

	#Optional
	defined_tags = {"foo-namespace.bar-key"= "value"}
	description = "Example DBCREDS named credential for management agent"
	freeform_tags = {"bar-key"= "value"}
}

Argument Reference

The following arguments are supported:

** 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:

Timeouts

The timeouts block allows you to specify timeouts for certain operations: * create - (Defaults to 20 minutes), when creating the Named Credential * update - (Defaults to 20 minutes), when updating the Named Credential * delete - (Defaults to 20 minutes), when destroying the Named Credential

Import

NamedCredentials can be imported using the id, e.g.

$ terraform import oci_management_agent_named_credential.test_named_credential "id"