oci_identity_network_source

This resource provides the Network Source resource in Oracle Cloud Infrastructure Identity service.

Creates a new network source in your tenancy.

You must specify your tenancy’s OCID as the compartment ID in the request object (remember that the tenancy is simply the root compartment). Notice that IAM resources (users, groups, compartments, and some policies) reside within the tenancy itself, unlike cloud resources such as compute instances, which typically reside within compartments inside the tenancy. For information about OCIDs, see Resource Identifiers.

You must also specify a name for the network source, which must be unique across all network sources in your tenancy, and cannot be changed. You can use this name or the OCID when writing policies that apply to the network source. For more information about policies, see How Policies Work.

You must also specify a description for the network source (although it can be an empty string). It does not have to be unique, and you can change it anytime with UpdateNetworkSource. After your network resource is created, you can use it in policy to restrict access to only requests made from an allowed IP address specified in your network source. For more information, see Managing Network Sources.

Example Usage

resource "oci_identity_network_source" "test_network_source" {
	#Required
	compartment_id = var.tenancy_ocid
	description = var.network_source_description
	name = var.network_source_name

	#Optional
	defined_tags = {"Operations.CostCenter"= "42"}
	freeform_tags = {"Department"= "Finance"}
	public_source_list = var.network_source_public_source_list
	services = var.network_source_services
	virtual_source_list = var.network_source_virtual_source_list
}

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

Import

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

$ terraform import oci_identity_network_source.test_network_source "id"