### Install Go Packages Source: https://github.com/efficientip-labs/terraform-provider-solidserver/blob/master/CONTRIBUTING.md Use the 'go get' command to install necessary Go packages. This may install binaries or packages into your GOPATH. ```bash go get ``` -------------------------------- ### Create Go Workspace Directories Source: https://github.com/efficientip-labs/terraform-provider-solidserver/blob/master/CONTRIBUTING.md Create the necessary directories for your Go workspace. This includes folders for source code, binaries, installed packages, and cloned GitHub repositories. ```bash mkdir -p $HOME/go export GOPATH="$HOME/go" # Folder contains your golang source codes mkdir -p $GOPATH/src # Folder contains the binaries when you install an go based executable mkdir -p $GOPATH/bin # Folder contains the Go packages you install mkdir -p $GOPATH/pkg # Folder contains the Github Source code for the repos you cloned mkdir -p $GOPATH/src/github.com ``` -------------------------------- ### solidserver_ip_mac Resource Example Source: https://github.com/efficientip-labs/terraform-provider-solidserver/blob/master/docs/resources/ip_mac.md Example usage of the solidserver_ip_mac resource to associate an IP address with a MAC address within a specified space. ```APIDOC ## solidserver_ip_mac (Resource) ### Description IP MAC resource allows to map an IP address with a MAC address. It does not reflect any object within SOLIDserver, it is useful when provisioning IP addresses for VM(s) for which the MAC address is unknown until deployed. ### Schema #### Required - **address** (String) The IP address to map with the MAC address. - **mac** (String) The MAC Address to map with the IP address. - **space** (String) The name of the space into which mapping the IP and the MAC address. #### Read-Only - **id** (String) The ID of this resource. ``` -------------------------------- ### solidserver_ip6_subnet_query Data Source Example Source: https://github.com/efficientip-labs/terraform-provider-solidserver/blob/master/docs/data-sources/ip6_subnet_query.md Example usage of the solidserver_ip6_subnet_query data source to retrieve an IPv6 subnet based on a query and tags. ```APIDOC ## solidserver_ip6_subnet_query Data Source ### Description IPv6 subnet query data-source allows to retrieve information about the first IPv6 subnet matching given criterias, including its meta-data. ### Parameters #### Required - `query` (String) - The query used to find the first matching subnet. #### Optional - `orderby` (String) - The query used to find the first matching subnet. - `tags` (String) - The tags to be used to find the first matching subnet in the query. ### Read-Only Attributes - `address` (String) - The IP subnet address. - `class` (String) - The class associated to the IPv6 subnet. - `class_parameters` (Map of String) - The class parameters associated to IPv6 subnet. - `gateway` (String) - The IPv6 subnet's computed gateway. - `id` (String) - The ID of this resource. - `name` (String) - The name of the IPv6 subnet. - `prefix` (String) - The IPv6 subnet prefix. - `prefix_size` (Number) - The IPv6 subnet's prefix length (ex: 64 for a '/64'). - `space` (String) - The space associated to the IPv6 subnet. - `terminal` (Boolean) - The terminal property of the IPv6 subnet. - `vlan_domain` (String) - The optional vlan Domain associated with the subnet. - `vlan_id` (Number) - The optional vlan ID associated with the subnet. - `vlan_name` (String) - The optional vlan Name associated with the subnet. - `vlan_range` (String) - The optional vlan Range associated with the subnet. ### Example Usage ```terraform data "solidserver_ip6_subnet_query" "mySecondIPv6SubnetQueriedData" { depends_on = [solidserver_ip6_subnet.mySecondIPv6Subnet] query = "tag_network_vnid = '12666' AND subnet_allocated_percent < '90.0'" tags = "network.vnid" } ``` ``` -------------------------------- ### solidserver_cdb_data Data Source Example Source: https://github.com/efficientip-labs/terraform-provider-solidserver/blob/master/docs/data-sources/cdb_data.md Example usage of the solidserver_cdb_data data source to retrieve custom database entries. ```APIDOC ## solidserver_cdb_data Data Source ### Description Custom DB Data data-source allows to retrieve custom database entries stored within SOLIDserver. This custom database entries can be leveraged within object classes and wizards in order to store custom meta-data. ### Parameters #### Required - `custom_db` (String) - The name of the custom DB. - `value1` (String) - The name of the value 1. #### Read-Only - `id` (String) - The ID of this resource. - `value10` (String) - The name of the value 10. - `value2` (String) - The name of the value 2. - `value3` (String) - The name of the value 3. - `value4` (String) - The name of the value 4. - `value5` (String) - The name of the value 5. - `value6` (String) - The name of the value 6. - `value7` (String) - The name of the value 7. - `value8` (String) - The name of the value 8. - `value9` (String) - The name of the value 9. ### Example Usage ```terraform data "solidserver_cdb_data" "myCustomData" { custom_db = "myFirstCustomDB" value1 = "FR" } ``` ``` -------------------------------- ### Create a PTR Record Source: https://github.com/efficientip-labs/terraform-provider-solidserver/blob/master/docs/resources/dns_rr.md This example demonstrates creating a PTR record. It utilizes the solidserver_ip_ptr data source to dynamically generate the FQDN from an IP address, ensuring correct formatting. ```terraform data "solidserver_ip_ptr" "myFirstIPPTR" { address = "${solidserver_ip_address.myFirstIPAddress.address}" } resource "solidserver_dns_rr" "aaRecord" { dnsserver = "ns.mycompany.priv" dnsview = "Internal" dnszone = "mycompany.priv" name = "${solidserver_ip_ptr.myFirstIPPTR.dname}" type = "PTR" value = "myapp.mycompany.priv" } ``` -------------------------------- ### Create a DNS Forward Zone Source: https://github.com/efficientip-labs/terraform-provider-solidserver/blob/master/docs/resources/dns_forward_zone.md Example of creating a basic DNS forward zone. It specifies the DNS server, zone name, forwarding mode, and a list of forwarders. ```terraform resource "solidserver_dns_forward_zone" "myFirstForwardZone" { dnsserver = "ns.priv" name = "fwd.mycompany.priv" forward = "first" forwarders = ["10.10.8.8", "10.10.4.4"] } ``` -------------------------------- ### SOLIDserver Provider Configuration (Username/Password) Source: https://github.com/efficientip-labs/terraform-provider-solidserver/blob/master/README.md Example configuration block for the SOLIDserver provider using username and password authentication. Ensure SOLIDServer_USERNAME, SOLIDServer_PASSWORD, and SOLIDServer_HOST environment variables are set or provide values directly. ```hcl provider "solidserver" { username = "username" password = "password" host = "192.168.0.1" sslverify = "false" } ``` -------------------------------- ### SOLIDserver Provider Configuration (Token Authentication) Source: https://github.com/efficientip-labs/terraform-provider-solidserver/blob/master/README.md Example configuration block for the SOLIDserver provider using token authentication. Set use_token to true and provide the token ID and secret. Ensure SOLIDServer_USE_TOKEN, SOLIDServer_USERNAME, SOLIDServer_PASSWORD, and SOLIDServer_HOST environment variables are set or provide values directly. ```hcl provider "solidserver" { use_token = true username = "token_id" password = "secret" host = "192.168.0.1" sslverify = "false" } ``` -------------------------------- ### Create DNS Resource Record (PTR) Source: https://context7.com/efficientip-labs/terraform-provider-solidserver/llms.txt Creates a PTR record, often derived from an allocated IP address. This example uses a data source to get the reverse DNS name (dname) and then creates the PTR record. ```terraform # PTR record derived from allocated IP data "solidserver_ip_ptr" "myFirstIPPTR" { address = solidserver_ip_address.myFirstIPAddress.address } resource "solidserver_dns_rr" "appPTRRecord" { dnsserver = solidserver_dns_smart.myFirstDnsSMART.name dnsview = solidserver_dns_view.myInternalView.name dnszone = solidserver_dns_zone.myFirstZone.name name = data.solidserver_ip_ptr.myFirstIPPTR.dname type = "PTR" value = "app.corp.local" } ``` -------------------------------- ### solidserver_ip6_pool Data Source Usage Source: https://github.com/efficientip-labs/terraform-provider-solidserver/blob/master/docs/data-sources/ip6_pool.md Example of how to use the solidserver_ip6_pool data source to retrieve information about an IPv6 pool. ```APIDOC ## solidserver_ip6_pool (Data Source) ### Description IPv6 pool data-source allows to retrieve information about reserved IPv6 pools including meta-data. ### Schema #### Required - `name` (String) The name of the IPv6 pool. - `space` (String) The space associated to the IPv6 pool. - `subnet` (String) The parent subnet of the IPv6 pool. #### Read-Only - `class` (String) The class associated to the IPv6 pool. - `class_parameters` (Map of String) The class parameters associated to the IPv6 pool. - `end` (String) The last address of the IPv6 pool. - `id` (String) The ID of this resource. - `prefix` (String) The prefix of the parent subnet of the IPv6 pool. - `prefix_size` (Number) The size prefix of the parent subnet of the IPv6 pool. - `start` (String) The fisrt address of the IPv6 pool. ### Example Usage ```terraform data "solidserver_ip6_pool" "myFirstIPv6PoolData" { depends_on = [solidserver_ip6_subnet.myFirstIPv6Pool] name = solidserver_ip6_subnet.myFirstIPv6Pool.name subnet = solidserver_ip6_subnet.myFirstIPv6Pool.subnet space = solidserver_ip6_subnet.myFirstIPv6Pool.space } ``` ``` -------------------------------- ### Create an IPv6 Address with MAC Association and Lifecycle Ignore Source: https://github.com/efficientip-labs/terraform-provider-solidserver/blob/master/docs/resources/ip6_address.md This example shows how to create an IPv6 address and associate a MAC address. It includes a lifecycle block to ignore changes to the 'mac' attribute, useful for stateful management when the MAC address might be updated externally. ```terraform resource "solidserver_ip6_address" "myFirstIP6Address" { space = "${solidserver_ip_space.myFirstSpace.name}" subnet = "${solidserver_ip6_subnet.myFirstIP6Subnet.name}" name = "myfirstip6address" lifecycle { ignore_changes = ["mac"] } } ``` -------------------------------- ### Create an IP Address with Lifecycle Ignoring MAC Changes Source: https://github.com/efficientip-labs/terraform-provider-solidserver/blob/master/docs/resources/ip_address.md This example shows how to create an IP address reservation while using the `lifecycle` block to ignore changes to the `mac` attribute. This is useful for managing IP-MAC associations where the MAC address might be managed externally or is not critical for Terraform's state. ```terraform resource "solidserver_ip_address" "myFirstIPAddress" { space = "${solidserver_ip_space.myFirstSpace.name}" subnet = "${solidserver_ip_subnet.myFirstIPSubnet.name}" name = "myfirstipaddress" lifecycle { ignore_changes = ["mac"] } } ``` -------------------------------- ### Create Terraform Test Files Source: https://github.com/efficientip-labs/terraform-provider-solidserver/blob/master/CONTRIBUTING.md Set up a testing folder and copy the sample test file. You will also need to create a 'variables.tf' file with your specific environment details. ```bash mkdir -p _tests cp tests/tests.tf _tests/tests.tf cd _tests/tests.tf ``` -------------------------------- ### Retrieve Custom DB Information Source: https://github.com/efficientip-labs/terraform-provider-solidserver/blob/master/docs/data-sources/cdb.md Use this data source to get details about a specific custom database by its name. This is useful for referencing custom database configurations within your Terraform setup. ```terraform data "solidserver_cdb" "myFirstCustomDB" { name = "myFirstCustomDB" } ``` -------------------------------- ### Build Terraform Provider SolidServer Source: https://github.com/efficientip-labs/terraform-provider-solidserver/blob/master/CONTRIBUTING.md Navigate to the project's root directory and run the 'make' command to build the provider. This is typically done for testing purposes. ```bash cd $GOPATH/src/github.com/EfficientIP-Labs/terraform-provider-solidserver make ``` -------------------------------- ### Build Terraform Provider Source: https://github.com/efficientip-labs/terraform-provider-solidserver/blob/master/README.md Steps to download and build the provider from the master branch using the Go compiler. ```bash cd "${GOPATH}" go get github.com/EfficientIP-Labs/terraform-provider-solidserver cd ./src/github.com/EfficientIP-Labs/terraform-provider-solidserver go get go build -o terraform-provider-solidserver_vX.Y.Z ``` -------------------------------- ### Create a new application Source: https://github.com/efficientip-labs/terraform-provider-solidserver/blob/master/docs/resources/app_application.md Use this resource to create a new application with specified name, FQDN, GSLB members, class, and class parameters. Ensure all required fields are provided. ```terraform resource "solidserver_app_application" "myFirstApplicaton" { name = "MyFirsApp" fqdn = "myfirstapp.priv" gslb_members = ["ns0.priv", "ns1.priv"] class = "INTERNAL_APP" class_parameters = { owner = "MR. Smith" contact = "a.smith@mycompany.priv" } } ``` -------------------------------- ### Retrieve DNS Server Information Source: https://github.com/efficientip-labs/terraform-provider-solidserver/blob/master/docs/data-sources/dns_server.md Use this data source to get details about a specific DNS server by its name. Ensure the DNS server exists in your SOLIDserver configuration. ```terraform data "solidserver_dns_server" "DnsServerData" { name = "ns.local" } ``` -------------------------------- ### Create a DNS Server Source: https://github.com/efficientip-labs/terraform-provider-solidserver/blob/master/docs/resources/dns_server.md Use this resource to register and configure a DNS server. It requires essential details like name, address, login, and password. Optional parameters allow for advanced configuration of forwarding, access control, and integration with a DNS SMART. ```terraform resource "solidserver_dns_server" "myFirstDnsServer" { name = "myfirstdnsserver.priv" address = "127.0.0.1" login = "admin" password = "admin" forward = "first" forwarders = ["10.0.0.42", "10.0.0.43"] allow_query = ["172.16.0.0/12", "10.0.0.0/8", "192.168.0.0/24"] allow_recursion = ["172.16.0.0/12", "10.0.0.0/8", "192.168.0.0/24"] smart = "${solidserver_dns_smart.myFirstDnsSMART.name}" smart_role = "master" comment = "My First DNS Server Autmatically created" } ``` -------------------------------- ### Create an IP Pool Source: https://context7.com/efficientip-labs/terraform-provider-solidserver/llms.txt Defines a named IP address range (pool) within a subnet for DHCP, provisioning, or delegation. Specifies the start address and size of the pool. ```terraform resource "solidserver_ip_pool" "myFirstIPPool" { space = solidserver_ip_space.myFirstSpace.name subnet = solidserver_ip_subnet.myFirstIPSubnet.name name = "myFirstIPPool" start = solidserver_ip_subnet.myFirstIPSubnet.address size = 50 dhcp_range = true } output "pool_prefix" { value = solidserver_ip_pool.myFirstIPPool.prefix } ``` -------------------------------- ### Create an IP Subnet with Gateway Offset and Class Source: https://github.com/efficientip-labs/terraform-provider-solidserver/blob/master/docs/resources/ip_subnet.md This snippet demonstrates creating a more specific IP subnet within an existing IP block. It includes parameters for the parent block, prefix size, name, a `gateway_offset` to reserve a gateway IP, and a `class` with associated `class_parameters` for advanced configuration. ```terraform resource "solidserver_ip_subnet" "myFirstIPSubnet" { space = "${solidserver_ip_space.myFirstSpace.name}" block = "${solidserver_ip_subnet.myFirstIPBlock.name}" prefix_size = 24 name = "myFirstIPSubnet" gateway_offset = -1 class = "VIRTUAL" class_parameters = { vnid = "12666" } } ``` -------------------------------- ### solidserver_ip6_address Data Source Source: https://github.com/efficientip-labs/terraform-provider-solidserver/blob/master/docs/data-sources/ip6_address.md Use the `solidserver_ip6_address` data source to get information about a reserved IPv6 address. You need to provide the `address` and `space` to uniquely identify the IPv6 address. ```APIDOC ## solidserver_ip6_address (Data Source) ### Description Retrieves information about a reserved IPv6 address, including its meta-data. ### Parameters #### Required - **address** (String) - The IPv6 address to retrieve. - **space** (String) - The name of the space where the IPv6 address resides. #### Read-Only - **class** (String) - The class associated with the IPv6 address. - **class_parameters** (Map of String) - The class parameters associated with the IPv6 address. - **device** (String) - The device name associated with the IPv6 address (requires a 'Device Manager' license). - **id** (String) - The unique identifier of the IPv6 address resource. - **mac** (String) - The MAC address associated with the IPv6 address. - **name** (String) - The short name or FQDN of the IPv6 address. - **pool** (String) - The name of the pool the IPv6 address belongs to. - **prefix** (String) - The IPv6 address prefix. - **prefix_size** (Number) - The prefix length associated with the IPv6 address. - **subnet** (String) - The name of the subnet the IPv6 address belongs to. ### Example Usage ```terraform data "solidserver_ip6_address" "example" { address = "2001:db8::1" space = "my-ipv6-space" } output "ipv6_address_name" { value = data.solidserver_ip6_address.example.name } ``` ``` -------------------------------- ### Retrieve DNS SMART Information Source: https://github.com/efficientip-labs/terraform-provider-solidserver/blob/master/docs/data-sources/dns_smart.md Use this data source to get information about a DNS SMART architecture by its name. Ensure the 'name' attribute matches an existing DNS SMART. ```terraform data "solidserver_dns_smart" "DnsSMARTData" { name = ssmart.local } ``` -------------------------------- ### Create an IP Address with Class and Device Association Source: https://github.com/efficientip-labs/terraform-provider-solidserver/blob/master/docs/resources/ip_address.md This snippet demonstrates creating a new IP address reservation within a specified space and subnet. It includes associating the IP address with a device and a specific class (e.g., AWS_VPC_ADDRESS) with relevant parameters. ```terraform resource "solidserver_ip_address" "myFirstIPAddress" { space = "${solidserver_ip_space.myFirstSpace.name}" subnet = "${solidserver_ip_subnet.myFirstIPSubnet.name}" name = "myfirstipaddress" device = "${solidserver_device.myFirstDevice.name}" class = "AWS_VPC_ADDRESS" class_parameters = { interfaceid = "eni-d5b961d5" } } ``` -------------------------------- ### Retrieve IP Address Information Source: https://github.com/efficientip-labs/terraform-provider-solidserver/blob/master/docs/data-sources/ip_address.md Use this data source to get details about a reserved IPv4 address. It requires the IP address and its space, and can optionally depend on a created IP address resource. ```terraform data "solidserver_ip_address" "myFirstIPAddressData" { depends_on = [solidserver_ip_address.myFirstIPAddress] name = solidserver_ip_address.myFirstIPAddress.name space = solidserver_ip_address.myFirstIPAddress.space } ``` -------------------------------- ### Create VLAN Range Source: https://context7.com/efficientip-labs/terraform-provider-solidserver/llms.txt Defines a contiguous range of VLAN/VxLAN IDs within a domain. Used for segmenting ID allocation by purpose or team, specifying start and end IDs and optional class parameters. ```terraform resource "solidserver_vlan_range" "prodRange" { name = "production" vlan_domain = solidserver_vlan_domain.myFirstVxlanDomain.name start = 1000 end = 1999 class_parameters = { team = "networking" } } ``` -------------------------------- ### Configure Go Workspace Environment Variables Source: https://github.com/efficientip-labs/terraform-provider-solidserver/blob/master/CONTRIBUTING.md Set these lines in your .bashrc to configure your Go environment. Ensure GO111MODULE is on and GOPATH is set to your desired workspace directory. ```bash GO111MODULE=on GOPATH="$HOME/go" ``` -------------------------------- ### Run Acceptance Tests Source: https://github.com/efficientip-labs/terraform-provider-solidserver/blob/master/README.md Command to execute acceptance tests for the SOLIDserver module. Requires environment variables for connection details and optionally disables TLS certificate validation. ```bash TF_ACC=1 go test solidserver -v -count=1 -tags "all" ``` -------------------------------- ### Create a DNS SMART Source: https://github.com/efficientip-labs/terraform-provider-solidserver/blob/master/docs/resources/dns_smart.md Use this resource to create a new DNS SMART architecture. Configure its name, architecture type, comments, recursion, forwarding, and access control lists for queries and recursion. ```terraform resource "solidserver_dns_smart" "myFirstDnsSMART" { name = "myfirstdnssmart.priv" arch = "multimaster" comment = "My First DNS SMART Autmatically created" recursion = true forward = "first" forwarders = ["10.0.0.42", "10.0.0.43"] allow_query = ["172.16.0.0/12", "10.0.0.0/8", "192.168.0.0/24"] allow_recursion = ["172.16.0.0/12", "10.0.0.0/8", "192.168.0.0/24"] } ``` -------------------------------- ### Create an A Record Source: https://github.com/efficientip-labs/terraform-provider-solidserver/blob/master/docs/resources/dns_rr.md Use this snippet to create a DNS A record. Ensure the dnsserver, dnszone, and name are correctly configured for your environment. ```terraform resource "solidserver_dns_rr" "aaRecord" { dnsserver = "ns.mycompany.priv" dnsview = "Internal" dnszone = "mycompany.priv" name = "aarecord.mycompany.priv" type = "A" value = "127.0.0.1" } ``` -------------------------------- ### Create a VXLAN Domain Source: https://github.com/efficientip-labs/terraform-provider-solidserver/blob/master/docs/resources/vlan_domain.md Use this snippet to create a new VXLAN domain. Ensure the `class` and `class_parameters` are correctly set for your environment. ```terraform resource "solidserver_vlan_domain" "myFirstVxlanDomain" { name = "myFirstVxlanDomain" vxlan = true class = "CUSTOM_VXLAN_DOMAIN" class_parameters = { LOCATION = "PARIS" } } ``` -------------------------------- ### Clone Terraform Provider SolidServer Repository Source: https://github.com/efficientip-labs/terraform-provider-solidserver/blob/master/CONTRIBUTING.md Clone the project repository into the correct location within your Go workspace. Ensure you are in the project directory before cloning. ```bash mkdir -p $GOPATH/src/github.com/EfficientIP-Labs/terraform-provider-solidserver cd $GOPATH/src/github.com/EfficientIP-Labs/terraform-provider-solidserver git clone git@github.com:alexissavin/terraform-provider-solidserver ``` -------------------------------- ### Provider Configuration Source: https://context7.com/efficientip-labs/terraform-provider-solidserver/llms.txt Configure the SOLIDserver provider with connection details and authentication methods. ```APIDOC ## Provider Configuration Configure the provider with credentials and connection details for the SOLIDserver instance. Supports both username/password and API token authentication, optional TLS verification bypass, proxy support, and a configurable API timeout. ```terraform terraform { required_providers { solidserver = { source = "EfficientIP-Labs/solidserver" version = "~> 1.1.0" } } } # Username / password authentication provider "solidserver" { username = "admin" password = "s3cr3t" host = "192.168.0.1" sslverify = false timeout = 30 } # Token authentication provider "solidserver" { use_token = true username = "my_token_id" password = "my_token_secret" host = "solidserver.corp.local" sslverify = true additional_trust_certs_file = "/etc/ssl/certs/corporate-ca.pem" proxy_url = "http://proxy.corp.local:3128" } # Environment variable driven (no credentials in code) # export SOLIDSERVER_HOST=192.168.0.1 # export SOLIDSERVER_USERNAME=admin # export SOLIDSERVER_PASSWORD=s3cr3t # export SOLIDSERVER_SSLVERIFY=false provider "solidserver" {} ``` ``` -------------------------------- ### Configure SOLIDserver Provider with Environment Variables Source: https://context7.com/efficientip-labs/terraform-provider-solidserver/llms.txt Configure the provider by leveraging environment variables for host, username, password, and SSL verification settings, avoiding hardcoding credentials in the configuration. ```shell # export SOLIDSERVER_HOST=192.168.0.1 # export SOLIDSERVER_USERNAME=admin # export SOLIDSERVER_PASSWORD=s3cr3t # export SOLIDSERVER_SSLVERIFY=false ``` ```terraform provider "solidserver" {} ``` -------------------------------- ### Create a Device - AWS EC2 Instance Source: https://github.com/efficientip-labs/terraform-provider-solidserver/blob/master/docs/resources/device.md Use this snippet to create a new network device, specifically an AWS EC2 instance, and associate it with a class and its parameters. Ensure the class and class_parameters are correctly defined for the target cloud environment. ```terraform resource "solidserver_device" "my_first_device" { name = "my_device" class = "AWS_EC2_INSTANCE" class_parameters = { cloudaz = "eu-west-1a" instanceid = "i-03d4bd36f915b0322" instancetype = "t2.micro" } } ``` -------------------------------- ### Create a DNS View Source: https://github.com/efficientip-labs/terraform-provider-solidserver/blob/master/docs/resources/dns_view.md This resource allows you to create a DNS view. Ensure the DNS server is defined before creating the view. You can configure recursion, forwarding, and client matching rules. ```terraform resource "solidserver_dns_view" "myFirstDnsView" { depends_on = [solidserver_dns_server.myFirstDnsServer] name = "myfirstdnsview" dnsserver = solidserver_dns_server.myFirstDnsServer.name recursion = true forward = "first" forwarders = ["8.8.8.8", "8.8.4.4"] match_clients = ["172.16.0.0/12", "192.168.0.0/24"] } ``` -------------------------------- ### Create a Custom Key-Value Database (CDB) Source: https://context7.com/efficientip-labs/terraform-provider-solidserver/llms.txt This resource creates a custom key-value database in SOLIDserver for storing arbitrary metadata. This metadata can be referenced by object classes and provisioning wizards. ```terraform resource "solidserver_cdb" "countryDB" { name = "CountryDB" label1 = "Country Code" label2 = "Country Name" label3 = "Region" } resource "solidserver_cdb_data" "franceEntry" { custom_db = solidserver_cdb.countryDB.name value1 = "FR" value2 = "France" value3 = "EMEA" } ``` -------------------------------- ### Create a User Source: https://github.com/efficientip-labs/terraform-provider-solidserver/blob/master/docs/resources/user.md Use this resource to create a new local user in SOLIDserver. Ensure all required fields like login, password, and group membership are provided. Optional fields can be used to set user details and class parameters. ```terraform resource "solidserver_user" "myFirstUser" { login = "jsmith" password = "a_very_c0mpl3x_P@ssw0rd" description = "My Very First User Resource" last_name = "Smith" first_name = "John" email = "j.smith@efficientip.com" groups = [ "${solidserver_usergroup.grp_admin.name}" ] } ``` -------------------------------- ### solidserver_app_application Source: https://context7.com/efficientip-labs/terraform-provider-solidserver/llms.txt Creates an application object with GSLB (Global Server Load Balancing) policy, defining FQDN-based traffic management across member DNS servers. ```APIDOC ## Resource: solidserver_app_application Creates an application object with GSLB (Global Server Load Balancing) policy, defining FQDN-based traffic management across member DNS servers. ```terraform resource "solidserver_app_application" "myFirstApplication" { name = "MyCorpApp" fqdn = "app.corp.local" gslb_members = ["ns0.corp.local", "ns1.corp.local"] class = "INTERNAL_APP" class_parameters = { owner = "MR. Smith" contact = "a.smith@corp.local" tier = "production" } } ``` ``` -------------------------------- ### Define Terraform Variables for Testing Source: https://github.com/efficientip-labs/terraform-provider-solidserver/blob/master/CONTRIBUTING.md Create a 'variables.tf' file to define necessary variables for your testing environment. Replace placeholder values with your actual SOLIDserver credentials and host information. ```hcl variable "solidserver_user" { type = string default = "" } variable "solidserver_password" { type = string default = "" } variable "solidserver_host" { type = string default = "" } ``` -------------------------------- ### Create a VLAN/VxLAN Source: https://github.com/efficientip-labs/terraform-provider-solidserver/blob/master/docs/resources/vlan.md Use this snippet to create a new VLAN or VxLAN. Ensure the `vlan_domain` is already defined. ```terraform resource "solidserver_vlan" "myFirstVxlan" { vlan_domain = "${solidserver_vlan_domain.myFirstVxlan.name}" name = "myFirstVxlan" } ``` -------------------------------- ### Create a Local SOLIDserver User Account Source: https://context7.com/efficientip-labs/terraform-provider-solidserver/llms.txt Use this resource to create a local user account in SOLIDserver. User permissions are controlled by their group memberships. ```terraform resource "solidserver_user" "jsmith" { login = "jsmith" password = "a_very_c0mpl3x_P@ssw0rd" description = "Network Engineer" last_name = "Smith" first_name = "John" email = "j.smith@corp.local" groups = [solidserver_usergroup.grp_netops.name] } ``` -------------------------------- ### Create an IP space Source: https://github.com/efficientip-labs/terraform-provider-solidserver/blob/master/docs/resources/ip_space.md Use this resource to create a new IP space. Specify the name, class, and any relevant class parameters. ```terraform resource "solidserver_ip_space" "myFirstSpace" { name = "myFirstSpace" class = "CUSTOM_SPACE" class_parameters = { LOCATION = "PARIS" } } ``` -------------------------------- ### Create a Custom DB Resource Source: https://github.com/efficientip-labs/terraform-provider-solidserver/blob/master/docs/resources/cdb.md Use this resource to create a new custom database within SOLIDserver. Specify the name for the database and the labels for its columns. ```terraform resource "solidserver_cdb" "myFirstCustomDB" { name = "myFirstCustomDB" label1 = "Country Code" label2 = "Country Name" } ``` -------------------------------- ### solidserver_dns_view Source: https://github.com/efficientip-labs/terraform-provider-solidserver/blob/master/docs/resources/dns_view.md Creates and configures a DNS view. DNS views are virtual containers used to implement DNS split horizon, providing different answers based on matching criteria. ```APIDOC ## solidserver_dns_view (Resource) ### Description Creates and configures a DNS view. DNS views are virtual containers used to implement DNS split horizon, providing different answers based on matching criteria. ### Schema #### Required - **dnsserver** (String) - The name of DNS server or DNS SMART hosting the DNS view to create. - **name** (String) - The name of the DNS view to create. #### Optional - **allow_query** (List of String) - A list of network prefixes allowed to query the view (named ACL(s) are not supported using this provider). Use '!' to negate an entry. - **allow_recursion** (List of String) - A list of network prefixes allowed to query the view for recursion (named ACL(s) are not supported using this provider). Use '!' to negate an entry. - **allow_transfer** (List of String) - A list of network prefixes allowed to query the view for zone transfert (named ACL(s) are not supported using this provider). Use '!' to negate an entry. - **class** (String) - The class associated to the DNS view. - **class_parameters** (Map of String) - The class parameters associated to the view. - **forward** (String) - The forwarding mode of the DNS SMART (Supported: none, first, only; Default: none). - **forwarders** (List of String) - The IP address list of the forwarder(s) configured to configure on the DNS SMART. - **match_clients** (List of String) - A list of network prefixes used to match the clients of the view (named ACL(s) are not supported using this provider). Use '!' to negate an entry. - **match_to** (List of String) - A list of network prefixes used to match the traffic to the view (named ACL(s) are not supported using this provider). Use '!' to negate an entry. - **recursion** (Boolean) - The recursion mode of the DNS view (Default: true). #### Read-Only - **id** (String) - The ID of this resource. - **order** (Number) - The level of the DNS view, where 0 represents the highest level in the views hierarchy. ### Example Usage ```terraform resource "solidserver_dns_view" "myFirstDnsView" { depends_on = [solidserver_dns_server.myFirstDnsServer] name = "myfirstdnsview" dnsserver = solidserver_dns_server.myFirstDnsServer.name recursion = true forward = "first" forwarders = ["8.8.8.8", "8.8.4.4"] match_clients = ["172.16.0.0/12", "192.168.0.0/24"] } ``` ``` -------------------------------- ### Create an IPv6 Address with Class Parameters Source: https://github.com/efficientip-labs/terraform-provider-solidserver/blob/master/docs/resources/ip6_address.md Use this snippet to create a new IPv6 address and associate it with a specific class and its parameters, such as an interface ID for AWS VPC addresses. Ensure the 'space', 'subnet', and 'device' resources are defined. ```terraform resource "solidserver_ip6_address" "myFirstIP6Address" { space = "${solidserver_ip_space.myFirstSpace.name}" subnet = "${solidserver_ip6_subnet.myFirstIP6Subnet.name}" name = "myfirstip6address" device = "${solidserver_device.myFirstDevice.name}" class = "AWS_VPC_ADDRESS" class_parameters = { interfaceid = "eni-d5b961d5" } } ``` -------------------------------- ### solidserver_ip_mac Source: https://context7.com/efficientip-labs/terraform-provider-solidserver/llms.txt Maps an existing IP address to a MAC address after the fact, useful when the MAC is only known post-VM deployment. ```APIDOC ## Resource: solidserver_ip_mac Maps an existing IP address to a MAC address after the fact — useful when the MAC is only known post-VM deployment. ### Example Usage: ```terraform resource "solidserver_ip_mac" "myFirstIPMacAssoc" { space = solidserver_ip_space.myFirstSpace.name address = solidserver_ip_address.myFirstIPAddress.address mac = "00:11:22:33:44:55" } ``` ``` -------------------------------- ### solidserver_user Resource Source: https://github.com/efficientip-labs/terraform-provider-solidserver/blob/master/docs/resources/user.md Creates and manages local SOLIDserver users who can connect through the Web GUI and use APIs. ```APIDOC ## solidserver_user (Resource) ### Description User resource allows to creat and manage local SOLIDserver users who can connect through Web GUI and use API(s). ### Schema #### Required - `groups` (Set of String) - The group id set for this user. - `login` (String) - The login of the user. - `password` (String) - The password of the user. #### Optional - `class_parameters` (Map of String) - The class parameters associated to the user. - `description` (String) - The description of the user. - `email` (String) - The email address of the user. - `first_name` (String) - The first name of the user. - `last_name` (String) - The last name of the user. #### Read-Only - `id` (String) - The ID of this resource. ### Example Usage ```terraform resource "solidserver_user" "myFirstUser" { login = "jsmith" password = "a_very_c0mpl3x_P@ssw0rd" description = "My Very First User Resource" last_name = "Smith" first_name = "John" email = "j.smith@efficientip.com" groups = [ "${solidserver_usergroup.grp_admin.name}" ] } ``` ``` -------------------------------- ### Create an Internal DNS View for Split-Horizon Source: https://context7.com/efficientip-labs/terraform-provider-solidserver/llms.txt Creates a DNS view for split-horizon DNS, matching clients to return different answers. Depends on a DNS server and configures recursion and forwarding. ```terraform resource "solidserver_dns_view" "myInternalView" { depends_on = [solidserver_dns_server.myFirstDnsServer] name = "internal" dnsserver = solidserver_dns_server.myFirstDnsServer.name recursion = true forward = "first" forwarders = ["10.0.0.42"] match_clients = ["172.16.0.0/12", "10.0.0.0/8"] allow_query = ["10.0.0.0/8", "172.16.0.0/12"] } output "view_order" { value = solidserver_dns_view.myInternalView.order } ``` -------------------------------- ### Create a new application pool Source: https://github.com/efficientip-labs/terraform-provider-solidserver/blob/master/docs/resources/app_pool.md Use this resource to create a new application pool. Ensure the associated application and its FQDN are already defined. The load balancing mode can be set to 'latency', 'weighted', or 'round-robin'. Session affinity can be enabled with an optional duration. ```terraform resource "solidserver_app_pool" "myFirstPool" { name = "myFirstPool" application = "${solidserver_app_application.myFirstApplicaton.name}" fqdn = "${solidserver_app_application.myFirstApplicaton.fqdn}" lb_mode = latency affinity = true affinity_session_duration = 300 } ``` -------------------------------- ### Create Application Object for GSLB Source: https://context7.com/efficientip-labs/terraform-provider-solidserver/llms.txt Creates an application object with GSLB policy, defining FQDN-based traffic management across member DNS servers. Requires application name, FQDN, and a list of GSLB members. ```terraform resource "solidserver_app_application" "myFirstApplication" { name = "MyCorpApp" fqdn = "app.corp.local" gslb_members = ["ns0.corp.local", "ns1.corp.local"] class = "INTERNAL_APP" class_parameters = { owner = "MR. Smith" contact = "a.smith@corp.local" tier = "production" } } ``` -------------------------------- ### Create a DNS SMART with Multimaster Architecture Source: https://context7.com/efficientip-labs/terraform-provider-solidserver/llms.txt Creates a DNS SMART, grouping multiple DNS servers into a single managed entity. Supports various HA architectures and query/recursion policies. ```terraform resource "solidserver_dns_smart" "myFirstDnsSMART" { name = "myfirstdnssmart.priv" arch = "multimaster" comment = "Primary SMART - auto-provisioned" recursion = true forward = "first" forwarders = ["10.0.0.42", "10.0.0.43"] allow_query = ["172.16.0.0/12", "10.0.0.0/8", "192.168.0.0/24"] allow_recursion = ["172.16.0.0/12", "10.0.0.0/8", "192.168.0.0/24"] allow_transfer = ["10.0.0.0/8"] } output "smart_members" { value = solidserver_dns_smart.myFirstDnsSMART.members } ``` -------------------------------- ### solidserver_dns_smart Source: https://context7.com/efficientip-labs/terraform-provider-solidserver/llms.txt Creates and manages a DNS SMART, a logical abstraction grouping DNS servers with configurable HA architectures. ```APIDOC ## Resource: solidserver_dns_smart Creates and manages a DNS SMART — a logical abstraction that groups multiple DNS servers into a single managed entity with configurable HA architectures (multimaster, master/slave, single). ### Example Usage: ```terraform resource "solidserver_dns_smart" "myFirstDnsSMART" { name = "myfirstdnssmart.priv" arch = "multimaster" comment = "Primary SMART - auto-provisioned" recursion = true forward = "first" forwarders = ["10.0.0.42", "10.0.0.43"] allow_query = ["172.16.0.0/12", "10.0.0.0/8", "192.168.0.0/24"] allow_recursion = ["172.16.0.0/12", "10.0.0.0/8", "192.168.0.0/24"] allow_transfer = ["10.0.0.0/8"] } ``` ``` -------------------------------- ### Create a Master DNS Zone with Automatic PTR Creation Source: https://context7.com/efficientip-labs/terraform-provider-solidserver/llms.txt Creates a master DNS zone hosted on a server or SMART. Supports automatic PTR record creation and explicit notifications. ```terraform resource "solidserver_dns_zone" "myFirstZone" { dnsserver = solidserver_dns_smart.myFirstDnsSMART.name dnsview = solidserver_dns_view.myInternalView.name name = "corp.local" type = "master" space = solidserver_ip_space.myFirstSpace.name createptr = true notify = "Explicit" also_notify = ["10.0.0.20:53"] class_parameters = { environment = "production" } } ``` -------------------------------- ### Create a User Group Source: https://github.com/efficientip-labs/terraform-provider-solidserver/blob/master/docs/resources/usergroup.md Use this resource to create a new user group. The `name` is required, and a `description` can be optionally provided. ```terraform resource "solidserver_usergroup" "t_group_01" { name = "group01" description = "descr01" } ``` -------------------------------- ### solidserver_dns_smart Data Source Source: https://github.com/efficientip-labs/terraform-provider-solidserver/blob/master/docs/data-sources/dns_smart.md Use the solidserver_dns_smart data source to retrieve information about a DNS SMART architecture. You need to provide the name of the DNS SMART. ```APIDOC ## solidserver_dns_smart Data Source ### Description Use the `solidserver_dns_smart` data source to retrieve information about a DNS SMART architecture. You need to provide the name of the DNS SMART. ### Parameters #### Path Parameters - **name** (String) - Required - The name of the DNS SMART. ### Read-Only Attributes - **allow_query** (List of String) - A list of network prefixes allowed to query the DNS server (named ACL(s) are not supported using this provider). - **allow_recursion** (List of String) - A list of network prefixes allowed to query the DNS server for recursion (named ACL(s) are not supported using this provider). - **allow_transfer** (List of String) - A list of network prefixes allowed to query the DNS server for zone transfert (named ACL(s) are not supported using this provider). - **arch** (String) - The SMART architecture type (masterslave|stealth|multimaster|single|farm). - **class** (String) - The class associated to the DNS server. - **class_parameters** (Map of String) - The class parameters associated to the DNS SMART. - **comment** (String) - Custom information about the DNS SMART. - **forward** (String) - The forwarding mode of the DNS SMART (Disabled if empty). - **forwarders** (List of String) - The IP address list of the forwarder(s) configured on the DNS SMART. - **id** (String) - The ID of this resource. - **members** (List of String) - The name of the DNS SMART members. - **recursion** (Boolean) - The recursion status of the DNS SMART. ### Example Usage ```terraform data "solidserver_dns_smart" "DnsSMARTData" { name = ssmart.local } ``` ``` -------------------------------- ### solidserver_dns_server Source: https://context7.com/efficientip-labs/terraform-provider-solidserver/llms.txt Registers and configures a physical DNS server, optionally enrolling it into a SMART with a specified role. ```APIDOC ## Resource: solidserver_dns_server Registers and configures a physical DNS server, optionally enrolling it into a SMART with a specified role. ### Example Usage: ```terraform resource "solidserver_dns_server" "myFirstDnsServer" { name = "ns1.corp.local" address = "10.0.0.10" login = "admin" password = "admin" smart = solidserver_dns_smart.myFirstDnsSMART.name smart_role = "master" forward = "first" forwarders = ["8.8.8.8", "8.8.4.4"] allow_query = ["10.0.0.0/8", "192.168.0.0/16"] allow_recursion = ["10.0.0.0/8"] comment = "Primary nameserver - managed by Terraform" } ``` ``` -------------------------------- ### Create a DNS Zone - SOLIDserver Terraform Source: https://github.com/efficientip-labs/terraform-provider-solidserver/blob/master/docs/resources/dns_zone.md Use this resource to create a new DNS zone. Specify the DNS server, zone name, type (master), associated space, and whether to create PTR records. Ensure the referenced space exists. ```terraform resource "solidserver_dns_zone" "myFirstZone" { dnsserver = "ns.priv" name = "mycompany.priv" type = "master" space = "${solidserver_ip_space.myFirstSpace.name}" createptr = false } ``` -------------------------------- ### Create an IP Alias Source: https://github.com/efficientip-labs/terraform-provider-solidserver/blob/master/docs/resources/ip_alias.md Use this resource to create a new IP alias. Ensure the associated space and IP address already exist. ```terraform resource "solidserver_ip_alias" "myFirstIPAlias" { space = "${solidserver_ip_space.myFirstSpace.name}" address = "${solidserver_ip_address.myFirstIPAddress.address}" name = "myfirstipcnamealias.mycompany.priv" } ```