UNPKG

@pulumi/f5bigip

Version:

A Pulumi package for creating and managing F5 BigIP resources.

332 lines • 13.1 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.GtmWideip = void 0; const pulumi = __importStar(require("@pulumi/pulumi")); const utilities = __importStar(require("./utilities")); /** * ## # f5bigip.GtmWideip Resource * * Provides a BIG-IP GTM (Global Traffic Manager) WideIP resource. This resource allows you to configure and manage GTM WideIP objects on a BIG-IP system. * * ## Description * * A WideIP is a DNS name that GTM resolves on behalf of an authoritative DNS server. WideIPs are the core objects in GTM that enable intelligent DNS-based load balancing and failover across multiple data centers. * * GTM WideIP types correspond to different DNS record types: * - **a**: IPv4 address records * - **aaaa**: IPv6 address records * - **cname**: Canonical name records * - **mx**: Mail exchange records * - **naptr**: Naming authority pointer records * - **srv**: Service locator records * * ## Example Usage * * ### Basic WideIP * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as f5bigip from "@pulumi/f5bigip"; * * const example = new f5bigip.GtmWideip("example", { * name: "testwideip.local", * type: "a", * partition: "Common", * description: "test_wideip_a", * }); * ``` * * ### WideIP with Last Resort Pool * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as f5bigip from "@pulumi/f5bigip"; * * const withPool = new f5bigip.GtmWideip("with_pool", { * name: "app.example.com", * type: "a", * partition: "Common", * description: "Application WideIP", * lastResortPool: "a /Common/firstpool", * poolLbMode: "round-robin", * minimalResponse: "enabled", * }); * ``` * * ### Advanced WideIP Configuration * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as f5bigip from "@pulumi/f5bigip"; * * const advanced = new f5bigip.GtmWideip("advanced", { * name: "advanced.example.com", * type: "a", * partition: "Common", * description: "Advanced WideIP configuration", * enabled: true, * failureRcode: "servfail", * failureRcodeResponse: "enabled", * failureRcodeTtl: 300, * lastResortPool: "a /Common/backup_pool", * minimalResponse: "disabled", * persistCidrIpv4: 24, * persistCidrIpv6: 64, * persistence: "enabled", * poolLbMode: "topology", * ttlPersistence: 7200, * topologyPreferEdns0ClientSubnet: "enabled", * loadBalancingDecisionLogVerbosities: [ * "pool-selection", * "pool-member-selection", * ], * aliases: [ * "app1.example.com", * "app2.example.com", * ], * }); * ``` * * ### IPv6 WideIP * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as f5bigip from "@pulumi/f5bigip"; * * const ipv6 = new f5bigip.GtmWideip("ipv6", { * name: "ipv6.example.com", * type: "aaaa", * partition: "Common", * description: "IPv6 WideIP", * enabled: true, * poolLbMode: "round-robin", * }); * ``` * * ## Notes * * ### Pool Load Balancing Modes * * The `poolLbMode` determines how GTM distributes DNS queries across pools: * * - **round-robin**: Distributes queries equally across all available pools * - **ratio**: Distributes queries based on pool ratios * - **topology**: Uses topology records to determine the best pool * - **global-availability**: Considers pool availability and load * - **virtual-server-capacity**: Based on virtual server capacity * - **least-connections**: Selects pool with fewest active connections * - **lowest-round-trip-time**: Selects pool with lowest RTT * - **fewest-hops**: Selects pool with fewest network hops * - **packet-rate**: Based on packet transmission rate * - **cpu**: Based on CPU utilization * - **completion-rate**: Based on connection completion rate * - **quality-of-service**: Based on QoS metrics * - **kilobytes-per-second**: Based on throughput * - **drop-packet**: Drops DNS packets (used for testing) * - **fallback-ip**: Returns a fallback IP address * - **virtual-server-score**: Based on virtual server scores * * ### Last Resort Pool Format * * The `lastResortPool` must be specified in the format: `<type> <partition>/<pool_name>` * * Examples: * - `a /Common/firstpool` - IPv4 pool * - `aaaa /Common/ipv6pool` - IPv6 pool * - `cname /Prod/alias_pool` - CNAME pool * * ### Persistence * * When persistence is enabled: * - GTM maintains a mapping of client IP addresses to pool members * - Subsequent requests from the same client are directed to the same destination * - The `persistCidrIpv4` and `persistCidrIpv6` settings determine the subnet mask used for grouping client IPs * - Persistence records expire after `ttlPersistence` seconds * * ### Failure RCODE Response * * When a WideIP becomes unavailable (all pools are down): * - If `failureRcodeResponse` is `disabled`: GTM returns no answer (NXDOMAIN) * - If `failureRcodeResponse` is `enabled`: GTM returns the specified `failureRcode` * * Common RCODE values: * - **noerror**: No error (returns empty response) * - **servfail**: Server failure * - **nxdomain**: Non-existent domain * - **refused**: Query refused * * ### Aliases * * Aliases allow you to specify alternate domain names for the same WideIP configuration. When a DNS query is made for any of the aliases, it is handled by the same WideIP configuration. * * Example: * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as f5bigip from "@pulumi/f5bigip"; * * const app = new f5bigip.GtmWideip("app", { * name: "app.example.com", * type: "a", * aliases: [ * "app-alias1.example.com", * "app-alias2.example.com", * "app.backup.example.com", * ], * }); * ``` * * In this example, DNS queries for `app.example.com`, `app-alias1.example.com`, `app-alias2.example.com`, or `app.backup.example.com` will all be handled by the same WideIP configuration. * * ## API Endpoints * * This resource interacts with the following BIG-IP API endpoints: * * - `GET /mgmt/tm/gtm/wideip/<type>/<name>` - Read WideIP configuration * - `POST /mgmt/tm/gtm/wideip/<type>` - Create WideIP * - `PUT /mgmt/tm/gtm/wideip/<type>/<name>` - Update WideIP configuration * - `DELETE /mgmt/tm/gtm/wideip/<type>/<name>` - Delete WideIP * * ## Related Resources * * - `f5bigip.GtmPool` - Manages GTM pools that can be referenced by WideIPs * - `f5bigip.GtmServer` - Manages GTM servers that contain virtual servers * - `f5bigip.GtmDatacenter` - Manages GTM data centers * - `bigipGtmTopology` - Manages topology records for topology-based load balancing * * ## Import * * GTM WideIP resources can be imported using the format `type:/partition/name`. For example: * * ```sh * $ pulumi import f5bigip:index/gtmWideip:GtmWideip example a:/Common/testwideip.local * ``` * * Additional import examples: * * Import an IPv6 WideIP * * ```sh * $ pulumi import f5bigip:index/gtmWideip:GtmWideip ipv6_example aaaa:/Common/ipv6.example.com * ``` * * Import a CNAME WideIP * * ```sh * $ pulumi import f5bigip:index/gtmWideip:GtmWideip cname_example cname:/Common/alias.example.com * ``` * * Import from a non-Common partition * * ```sh * $ pulumi import f5bigip:index/gtmWideip:GtmWideip prod_example a:/Production/app.example.com * ``` */ class GtmWideip extends pulumi.CustomResource { /** * Get an existing GtmWideip resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name, id, state, opts) { return new GtmWideip(name, state, { ...opts, id: id }); } /** @internal */ static __pulumiType = 'f5bigip:index/gtmWideip:GtmWideip'; /** * Returns true if the given object is an instance of GtmWideip. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === GtmWideip.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["aliases"] = state?.aliases; resourceInputs["description"] = state?.description; resourceInputs["disabled"] = state?.disabled; resourceInputs["enabled"] = state?.enabled; resourceInputs["failureRcode"] = state?.failureRcode; resourceInputs["failureRcodeResponse"] = state?.failureRcodeResponse; resourceInputs["failureRcodeTtl"] = state?.failureRcodeTtl; resourceInputs["lastResortPool"] = state?.lastResortPool; resourceInputs["loadBalancingDecisionLogVerbosities"] = state?.loadBalancingDecisionLogVerbosities; resourceInputs["minimalResponse"] = state?.minimalResponse; resourceInputs["name"] = state?.name; resourceInputs["partition"] = state?.partition; resourceInputs["persistCidrIpv4"] = state?.persistCidrIpv4; resourceInputs["persistCidrIpv6"] = state?.persistCidrIpv6; resourceInputs["persistence"] = state?.persistence; resourceInputs["poolLbMode"] = state?.poolLbMode; resourceInputs["topologyPreferEdns0ClientSubnet"] = state?.topologyPreferEdns0ClientSubnet; resourceInputs["ttlPersistence"] = state?.ttlPersistence; resourceInputs["type"] = state?.type; } else { const args = argsOrState; if (args?.name === undefined && !opts.urn) { throw new Error("Missing required property 'name'"); } if (args?.type === undefined && !opts.urn) { throw new Error("Missing required property 'type'"); } resourceInputs["aliases"] = args?.aliases; resourceInputs["description"] = args?.description; resourceInputs["disabled"] = args?.disabled; resourceInputs["enabled"] = args?.enabled; resourceInputs["failureRcode"] = args?.failureRcode; resourceInputs["failureRcodeResponse"] = args?.failureRcodeResponse; resourceInputs["failureRcodeTtl"] = args?.failureRcodeTtl; resourceInputs["lastResortPool"] = args?.lastResortPool; resourceInputs["loadBalancingDecisionLogVerbosities"] = args?.loadBalancingDecisionLogVerbosities; resourceInputs["minimalResponse"] = args?.minimalResponse; resourceInputs["name"] = args?.name; resourceInputs["partition"] = args?.partition; resourceInputs["persistCidrIpv4"] = args?.persistCidrIpv4; resourceInputs["persistCidrIpv6"] = args?.persistCidrIpv6; resourceInputs["persistence"] = args?.persistence; resourceInputs["poolLbMode"] = args?.poolLbMode; resourceInputs["topologyPreferEdns0ClientSubnet"] = args?.topologyPreferEdns0ClientSubnet; resourceInputs["ttlPersistence"] = args?.ttlPersistence; resourceInputs["type"] = args?.type; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(GtmWideip.__pulumiType, name, resourceInputs, opts); } } exports.GtmWideip = GtmWideip; //# sourceMappingURL=gtmWideip.js.map