oci_service_mesh_access_policy

This resource provides the Access Policy resource in Oracle Cloud Infrastructure Service Mesh service.

Creates a new AccessPolicy.

Example Usage

resource "oci_service_mesh_access_policy" "test_access_policy" {
	#Required
	compartment_id = var.compartment_id
	mesh_id = oci_service_mesh_mesh.test_mesh.id
	name = var.access_policy_name
	rules {
		#Required
		action = var.access_policy_rules_action
		destination {
			#Required
			type = var.access_policy_rules_destination_type

			#Optional
			hostnames = var.access_policy_rules_destination_hostnames
			ingress_gateway_id = oci_service_mesh_ingress_gateway.test_ingress_gateway.id
			ip_addresses = var.access_policy_rules_destination_ip_addresses
			ports = var.access_policy_rules_destination_ports
			protocol = var.access_policy_rules_destination_protocol
			virtual_service_id = oci_service_mesh_virtual_service.test_virtual_service.id
		}
		source {
			#Required
			type = var.access_policy_rules_source_type

			#Optional
			hostnames = var.access_policy_rules_source_hostnames
			ingress_gateway_id = oci_service_mesh_ingress_gateway.test_ingress_gateway.id
			ip_addresses = var.access_policy_rules_source_ip_addresses
			ports = var.access_policy_rules_source_ports
			protocol = var.access_policy_rules_source_protocol
			virtual_service_id = oci_service_mesh_virtual_service.test_virtual_service.id
		}
	}

	#Optional
	defined_tags = {"foo-namespace.bar-key"= "value"}
	description = var.access_policy_description
	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 Access Policy * update - (Defaults to 20 minutes), when updating the Access Policy * delete - (Defaults to 20 minutes), when destroying the Access Policy

Import

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

$ terraform import oci_service_mesh_access_policy.test_access_policy "id"