Skip to content

Network Access Resources#

On Ametnes Cloud, each service resource created must be accessible via fqdn endpoint. When creating a service resource, the resource must be attached to a network access resource which is typically, but not always, a load balancer.

A network access resource must be created first before any service is created.

Auto Network Resources#

In most cases, you do not need to specify the network resource and have Ametnes manage it for you. In this case, Ametnes will automatically provision a network resource when you first create a service resource and tear it down when the service resource is deleted.

Manual Network Resources#

Network Visibility#

When a load balancer is used as the network access resource to expose your data service, you can choose for this load balancer to be publicly facing or not.

To create a publicly facing load balancer;

In the Ametnes Cloud console;

  1. Navigate to the Network Access left menu.
  2. On the network access dashboard, click New Network.
  3. Enter Name: TutorialNetwork.
  4. Select Kind: Load Balancer.
  5. Select the Location: You Data Service Location.
  6. In the config section, uncheck the Visibility: private option.
  7. Client Create Network.

Define your resources#

network.tf
# Create a network access resource.
resource "ametnes_network" "network" {
  name = "NETWORK-USE2"
  project = ametnes_project.project.id
  location = data.ametnes_location.location.id
  description = "My Network Access resource"
    config = {
     "visiblity" = "private"
   }
}

Attaching a Network Access Resource#

Every data service, must be attached to a network access resource. To attach a new data service to a network,

When creating a data service in the Ametnes Cloud console;

  1. Navigate to the Services left menu.
  2. On the network access dashboard, click New Service.
  3. Enter Name: PostgresService.
  4. Select Kind: Postgres 13.0 Service.
  5. Select the Location: You Data Service Location.
  6. Select the Network: PostgresTutorialNetwork.
  7. Click Create Service

If there is only one network access resource in the target data service location, it will be auto-selected.

service.tf
# Create a service resource.
resource "ametnes_service" "service" {
  name = "Weaviate-Demo-Instance"
  project = ametnes_project.project.id
  location = data.ametnes_location.location.id
  kind = "postgres:13.0"
  description = "PostgresTutorialNetwork"
  network = ametnes_network.network.resource_id
  capacity {
    storage = 10
    memory = 1
    cpu = 1
  }
   config = {
     "admin.user" = "admin"
     "admin.password" = "fo9ruk3kee7uJe1vi"
   }
  nodes = 1
}

Public Cloud Deployments#

When deploying on a public cloud and a loadbalancer is used for your network access resource, your cloud provider will provision a load balancer for you. This load balancer must allow for layer 4 traffic.

On-prem Deployments#

For On-prem deployments, you can choose; 1. A load balancer will be created that uses NodePorts. 2. Alternatively, you can choose to use the Citrix ADC loadbalancer