sharedfilesystem_sharenetwork_v2

Use this resource to configure a share network.

A share network stores network information that share servers can use when shares are created.

Example Usage

Basic share network

resource "openstack_networking_network_v2" "network_1" {
  name           = "network_1"
  admin_state_up = "true"
}

resource "openstack_networking_subnet_v2" "subnet_1" {
  name       = "subnet_1"
  cidr       = "192.168.199.0/24"
  ip_version = 4
  network_id = openstack_networking_network_v2.network_1.id
}

resource "openstack_sharedfilesystem_sharenetwork_v2" "sharenetwork_1" {
  name              = "test_sharenetwork"
  description       = "test share network"
  neutron_net_id    = openstack_networking_network_v2.network_1.id
  neutron_subnet_id = openstack_networking_subnet_v2.subnet_1.id
}

Share network with associated security services

resource "openstack_networking_network_v2" "network_1" {
  name           = "network_1"
  admin_state_up = "true"
}

resource "openstack_networking_subnet_v2" "subnet_1" {
  name       = "subnet_1"
  cidr       = "192.168.199.0/24"
  ip_version = 4
  network_id = openstack_networking_network_v2.network_1.id
}

resource "openstack_sharedfilesystem_securityservice_v2" "securityservice_1" {
  name        = "security"
  description = "created by terraform"
  type        = "active_directory"
  server      = "192.168.199.10"
  dns_ip      = "192.168.199.10"
  domain      = "example.com"
  ou          = "CN=Computers,DC=example,DC=com"
  user        = "joinDomainUser"
  password    = "s8cret"
}

resource "openstack_sharedfilesystem_sharenetwork_v2" "sharenetwork_1" {
  name              = "test_sharenetwork"
  description       = "test share network with security services"
  neutron_net_id    = openstack_networking_network_v2.network_1.id
  neutron_subnet_id = openstack_networking_subnet_v2.subnet_1.id
  security_service_ids = [
    openstack_sharedfilesystem_securityservice_v2.securityservice_1.id,
  ]
}

Argument Reference

The following arguments are supported:

Attributes Reference

Import

This resource can be imported by specifying the ID of the share network:

$ terraform import openstack_sharedfilesystem_sharenetwork_v2.sharenetwork_1 id