oci_security_attribute_security_attribute

This resource provides the Security Attribute resource in Oracle Cloud Infrastructure Security Attribute service.

Creates a new security attribute in the specified security attribute namespace.

The security attribute requires either the OCID or the name of the security attribute namespace that will contain this security attribute.

You must specify a name for the attribute, which must be unique across all attributes in the security attribute namespace and cannot be changed. The only valid characters for security attribute names are: 0-9, A-Z, a-z, -, _ characters. Names are case insensitive. That means, for example, “mySecurityAttribute” and “mysecurityattribute” are not allowed in the same namespace. If you specify a name that’s already in use in the security attribute namespace, a 409 error is returned.

The security attribute must have a description. It does not have to be unique, and you can change it with UpdateSecurityAttribute.

When a validator is specified, The security attribute must have a value type. Security attribute can use either a static value or a list of possible values. Static values are entered by a user when applying the security attribute to a resource. Lists are created by the user and the user must apply a value from the list. Lists are validated.

Example Usage

resource "oci_security_attribute_security_attribute" "test_security_attribute" {
	#Required
	description = var.security_attribute_description
	name = var.security_attribute_name
	security_attribute_namespace_id = oci_security_attribute_security_attribute_namespace.test_security_attribute_namespace.id

	#Optional
	validator {
		#Required
		validator_type = var.security_attribute_validator_validator_type

		#Optional
		values = var.security_attribute_validator_values
	}
}

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 15 minutes), when creating the Security Attribute * update - (Defaults to 15 minutes), when updating the Security Attribute * delete - (Defaults to 12 hours), when destroying the Security Attribute

Import

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

$ terraform import oci_security_attribute_security_attribute.test_security_attribute "securityAttributeNamespaces/{securityAttributeNamespaceId}/securityAttributes/{securityAttributeName}"