oci_certificates_management_certificate

This resource provides the Certificate resource in Oracle Cloud Infrastructure Certificates Management service.

Creates a new certificate according to the details of the request.

Example Usage

resource "oci_certificates_management_certificate" "test_certificate" {
	#Required
	certificate_config {
		#Required
		config_type = var.certificate_certificate_config_config_type

		#Optional
		cert_chain_pem = var.certificate_certificate_config_cert_chain_pem
		certificate_pem = var.certificate_certificate_config_certificate_pem
		certificate_profile_type = var.certificate_certificate_config_certificate_profile_type
		csr_pem = var.certificate_certificate_config_csr_pem
		issuer_certificate_authority_id = oci_certificates_management_certificate_authority.test_certificate_authority.id
		key_algorithm = var.certificate_certificate_config_key_algorithm
		private_key_pem = var.certificate_certificate_config_private_key_pem
		private_key_pem_passphrase = var.certificate_certificate_config_private_key_pem_passphrase
		signature_algorithm = var.certificate_certificate_config_signature_algorithm
		subject {

			#Optional
			common_name = var.certificate_certificate_config_subject_common_name
			country = var.certificate_certificate_config_subject_country
			distinguished_name_qualifier = var.certificate_certificate_config_subject_distinguished_name_qualifier
			domain_component = var.certificate_certificate_config_subject_domain_component
			generation_qualifier = var.certificate_certificate_config_subject_generation_qualifier
			given_name = var.certificate_certificate_config_subject_given_name
			initials = var.certificate_certificate_config_subject_initials
			locality_name = var.certificate_certificate_config_subject_locality_name
			organization = var.certificate_certificate_config_subject_organization
			organizational_unit = var.certificate_certificate_config_subject_organizational_unit
			pseudonym = var.certificate_certificate_config_subject_pseudonym
			serial_number = var.certificate_certificate_config_subject_serial_number
			state_or_province_name = var.certificate_certificate_config_subject_state_or_province_name
			street = var.certificate_certificate_config_subject_street
			surname = var.certificate_certificate_config_subject_surname
			title = var.certificate_certificate_config_subject_title
			user_id = oci_identity_user.test_user.id
		}
		subject_alternative_names {

			#Optional
			type = var.certificate_certificate_config_subject_alternative_names_type
			value = var.certificate_certificate_config_subject_alternative_names_value
		}
		validity {

			#Optional
			time_of_validity_not_after = var.certificate_certificate_config_validity_time_of_validity_not_after
			time_of_validity_not_before = var.certificate_certificate_config_validity_time_of_validity_not_before
		}
		version_name = var.certificate_certificate_config_version_name
	}
	compartment_id = var.compartment_id
	name = var.certificate_name

	#Optional
	certificate_rules {
		#Required
		advance_renewal_period = var.certificate_certificate_rules_advance_renewal_period
		renewal_interval = var.certificate_certificate_rules_renewal_interval
		rule_type = var.certificate_certificate_rules_rule_type
	}
	defined_tags = {"Operations.CostCenter"= "42"}
	description = var.certificate_description
	freeform_tags = {"Department"= "Finance"}
}

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 Certificate * update - (Defaults to 20 minutes), when updating the Certificate * delete - (Defaults to 20 minutes), when destroying the Certificate

Import

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

$ terraform import oci_certificates_management_certificate.test_certificate "id"