/ocloud-asset-network

Service Assets for the Terraform ocloud framework

Primary LanguageHCLUniversal Permissive License v1.0UPL-1.0

Requirements

Providers

Name Version

oci

n/a

n/a

n/a

Module

module "service_segment" {
  source     = "./component/network_segment/"
  providers  = { oci = oci.home }
  depends_on = [ module.network_domain ]
  # Define unique number per segment
  segment    = 1
  config     = {
    service_id     = local.service_id
    display_name   = lower("${var.service.name}_${var.network}")
    compartment_id = module.network_domain.compartment_id
    deployment_type = var.deployment_types["${var.bundle}"]
    freeform_tags  = {
      "framework"  = "ocloud"
    }
  }
  network = {
    description          = "virtual cloud network"
    address_spaces = {
      "cidr_block"       = "10.0.0.0/24"
      "anywhere"         = "0.0.0.0/0"
      "interconnect"     = "192.168.0.0/16"
    }
    subnet_list = {
      # A list with newbits for the cidrsubnet function, for subnet calculations visit http://jodies.de/ipcalc
      app                = 1
      db                 = 2
      pres               = 2
    }
    create_drg           = true
    block_nat_traffic    = false
    # Alternative: "oci-${local.region_key}-objectstorage"
    service_gateway_cidr = "all-${lower(local.home_region_key)}-services-in-oracle-services-network"
  }
}

Resources

Name Type

resource

resource

resource

resource

resource

resource

resource

resource

resource

resource

resource

data source

data source

data source

data source

data source

data source

data source

data source

data source

data source

data source

resource

resource

Inputs

Name Description Type Default Required

Service Configuration

object({
    service_id     = string,
    display_name   = string,
    compartment_id = string,
    deployment_type    = string,
    freeform_tags  = map(any)
  })

n/a

yes

Settings for the virtual cloud network

object({
    address_spaces                  = map(string),  # Network address prefix in CIDR notation that all of the requested subnetwork prefixes will be allocated within.
    subnet_list                     = map(number), # A list of objects describing requested subnetwork prefixes. new_bits is the number of additional network prefix bits to add, in addition to the existing prefix on base_cidr_block.
    create_drg                      = bool,
    block_nat_traffic               = bool,   # Whether or not to block traffic through NAT gateway
    service_gateway_cidr            = string # The OSN service cidr accessible through Service Gateway"
  })

n/a

yes

Identify the domain, use a unique number

number

n/a

yes

Parameter definitions can be found in the glossary

Outputs

Name Description

Echoes back the anywhere setting for the vcn module

Echoes back the base_cidr_block input variable value, for convenience if passing the result of this module elsewhere as an object.

Dynamic Routing Gateway

Internet Gateway

NAT Gateway

osn

Oracle Service Network

Service Gateway

Route traffic to the Oracle Service Network

Route traffic inside the VCN

Route traffic to the anywhere address space

Security Group

A list of objects corresponding to each of the objects in the input variable 'networks', each extended with a new attribute 'cidr_block' giving the network’s allocated address prefix.

Virtual Cloud Network