@pulumi/f5bigip
Version:
A Pulumi package for creating and managing F5 BigIP resources.
344 lines • 14.5 kB
JavaScript
;
// *** 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.GtmPool = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("./utilities"));
/**
* ## # f5bigip.GtmPool Resource
*
* Provides a BIG-IP GTM (Global Traffic Manager) Pool resource. This resource allows you to configure and manage GTM Pool objects on a BIG-IP system.
*
* ## Description
*
* A GTM pool is a collection of virtual servers or other pool members that can be distributed across multiple data centers. GTM pools are used by WideIPs to intelligently distribute DNS traffic based on various load balancing algorithms and health monitoring.
*
* GTM Pool types correspond to different DNS record types:
* - **a**: IPv4 address pools
* - **aaaa**: IPv6 address pools
* - **cname**: Canonical name pools
* - **mx**: Mail exchange pools
* - **naptr**: Naming authority pointer pools
* - **srv**: Service locator pools
*
* ## Example Usage
*
* ### Basic Pool
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as f5bigip from "@pulumi/f5bigip";
*
* const example = new f5bigip.GtmPool("example", {
* name: "my_pool",
* type: "a",
* partition: "Common",
* loadBalancingMode: "round-robin",
* monitor: "/Common/https",
* });
* ```
*
* ### Pool with Members
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as f5bigip from "@pulumi/f5bigip";
*
* const withMembers = new f5bigip.GtmPool("with_members", {
* name: "app_pool",
* type: "a",
* partition: "Common",
* loadBalancingMode: "round-robin",
* monitor: "/Common/https",
* ttl: 30,
* members: [
* {
* name: "server1:/Common/vs_app",
* enabled: true,
* ratio: 1,
* memberOrder: 0,
* },
* {
* name: "server2:/Common/vs_app",
* enabled: true,
* ratio: 1,
* memberOrder: 1,
* },
* ],
* });
* ```
*
* ### Advanced Pool Configuration
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as f5bigip from "@pulumi/f5bigip";
*
* const advanced = new f5bigip.GtmPool("advanced", {
* name: "advanced_pool",
* type: "a",
* partition: "Common",
* loadBalancingMode: "round-robin",
* alternateMode: "topology",
* fallbackMode: "return-to-dns",
* fallbackIp: "192.0.2.1",
* maxAnswersReturned: 2,
* ttl: 60,
* monitor: "/Common/https",
* verifyMemberAvailability: "enabled",
* qosHitRatio: 10,
* qosHops: 5,
* qosKilobytesSecond: 5,
* qosLcs: 50,
* qosPacketRate: 5,
* qosRtt: 100,
* limitMaxConnections: 5000,
* limitMaxConnectionsStatus: "enabled",
* limitMaxBps: 100000000,
* limitMaxBpsStatus: "enabled",
* minMembersUpMode: "at-least",
* minMembersUpValue: 2,
* members: [
* {
* name: "server1:/Common/vs_app",
* enabled: true,
* ratio: 2,
* memberOrder: 0,
* monitor: "default",
* limitMaxConnections: 2000,
* limitMaxConnectionsStatus: "enabled",
* },
* {
* name: "server2:/Common/vs_app",
* enabled: true,
* ratio: 1,
* memberOrder: 1,
* },
* ],
* });
* ```
*
* ## Notes
*
* ### Pool Member Name Format
*
* Pool members must be specified in the format: `<server_name>:<virtual_server_name>`
*
* Examples:
* - `server1:/Common/vs_app` - References virtual server `vsApp` on server `server1`
* - `dc1_server:/Prod/app_vs` - References virtual server `appVs` in partition `Prod` on server `dc1Server`
*
* The server and virtual server must already exist in the GTM configuration.
*
* ### Load Balancing Modes
*
* The `loadBalancingMode` determines how GTM distributes DNS queries across pool members:
*
* - **round-robin**: Distributes queries equally across all available members
* - **ratio**: Distributes queries based on member ratios
* - **topology**: Uses topology records to determine the best member
* - **global-availability**: Considers member availability and load
* - **virtual-server-capacity**: Based on virtual server capacity
* - **least-connections**: Selects member with fewest active connections
* - **lowest-round-trip-time**: Selects member with lowest RTT
* - **fewest-hops**: Selects member 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
* - **dynamic-ratio**: Dynamically adjusts member ratios
* - **drop-packet**: Drops DNS packets (used for testing)
* - **fallback-ip**: Returns a fallback IP address
* - **virtual-server-score**: Based on virtual server scores
*
* ### QoS Weights
*
* QoS (Quality of Service) weights are used when the load balancing mode is set to `quality-of-service`. Higher weights give more importance to specific metrics:
*
* - **qos_hit_ratio**: Cache hit ratio
* - **qos_hops**: Number of router hops
* - **qos_kilobytes_second**: Data throughput
* - **qos_lcs**: Link capacity score
* - **qos_packet_rate**: Packet transmission rate
* - **qos_rtt**: Round trip time
* - **qos_topology**: Topology distance
* - **qos_vs_capacity**: Virtual server capacity
* - **qos_vs_score**: Virtual server score
*
* ### Connection Limits
*
* Connection limits can be set at both the pool level and individual member level:
* - Pool-level limits apply to the entire pool
* - Member-level limits apply to individual members
* - Both limits must have their corresponding `_status` field set to `enabled` to take effect
*
* ### Minimum Members
*
* The `minMembersUpMode` and `minMembersUpValue` work together:
* - **off**: No minimum requirement
* - **at-least**: At least `minMembersUpValue` members must be up
* - **percent**: At least `minMembersUpValue` percent of members must be up
*
* Example: If you have 5 members and set `minMembersUpMode = "at-least"` and `minMembersUpValue = 2`, the pool will be marked down if fewer than 2 members are available.
*
* ## API Endpoints
*
* This resource interacts with the following BIG-IP API endpoints:
*
* - `GET /mgmt/tm/gtm/pool/<type>/<name>?expandSubcollections=true` - Read pool configuration
* - `POST /mgmt/tm/gtm/pool/<type>` - Create pool
* - `PUT /mgmt/tm/gtm/pool/<type>/<name>` - Update pool configuration
* - `DELETE /mgmt/tm/gtm/pool/<type>/<name>` - Delete pool
*
* ## Related Resources
*
* - `f5bigip.GtmWideip` - Manages GTM WideIPs that reference pools
* - `f5bigip.GtmServer` - Manages GTM servers that contain virtual servers
* - `f5bigip.GtmDatacenter` - Manages GTM data centers
* - `bigipGtmMonitor` - Manages GTM health monitors
*
* ## Import
*
* GTM Pool resources can be imported using the format `/<partition>/<name>:<type>`. For example:
*
* ```sh
* $ pulumi import f5bigip:index/gtmPool:GtmPool example /Common/my_pool:a
* ```
*/
class GtmPool extends pulumi.CustomResource {
/**
* Get an existing GtmPool 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 GtmPool(name, state, { ...opts, id: id });
}
/** @internal */
static __pulumiType = 'f5bigip:index/gtmPool:GtmPool';
/**
* Returns true if the given object is an instance of GtmPool. 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'] === GtmPool.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["alternateMode"] = state?.alternateMode;
resourceInputs["disabled"] = state?.disabled;
resourceInputs["dynamicRatio"] = state?.dynamicRatio;
resourceInputs["enabled"] = state?.enabled;
resourceInputs["fallbackIp"] = state?.fallbackIp;
resourceInputs["fallbackMode"] = state?.fallbackMode;
resourceInputs["limitMaxBps"] = state?.limitMaxBps;
resourceInputs["limitMaxBpsStatus"] = state?.limitMaxBpsStatus;
resourceInputs["limitMaxConnections"] = state?.limitMaxConnections;
resourceInputs["limitMaxConnectionsStatus"] = state?.limitMaxConnectionsStatus;
resourceInputs["limitMaxPps"] = state?.limitMaxPps;
resourceInputs["limitMaxPpsStatus"] = state?.limitMaxPpsStatus;
resourceInputs["loadBalancingMode"] = state?.loadBalancingMode;
resourceInputs["manualResume"] = state?.manualResume;
resourceInputs["maxAnswersReturned"] = state?.maxAnswersReturned;
resourceInputs["members"] = state?.members;
resourceInputs["minMembersUpMode"] = state?.minMembersUpMode;
resourceInputs["minMembersUpValue"] = state?.minMembersUpValue;
resourceInputs["monitor"] = state?.monitor;
resourceInputs["name"] = state?.name;
resourceInputs["partition"] = state?.partition;
resourceInputs["qosHitRatio"] = state?.qosHitRatio;
resourceInputs["qosHops"] = state?.qosHops;
resourceInputs["qosKilobytesSecond"] = state?.qosKilobytesSecond;
resourceInputs["qosLcs"] = state?.qosLcs;
resourceInputs["qosPacketRate"] = state?.qosPacketRate;
resourceInputs["qosRtt"] = state?.qosRtt;
resourceInputs["qosTopology"] = state?.qosTopology;
resourceInputs["qosVsCapacity"] = state?.qosVsCapacity;
resourceInputs["qosVsScore"] = state?.qosVsScore;
resourceInputs["ttl"] = state?.ttl;
resourceInputs["type"] = state?.type;
resourceInputs["verifyMemberAvailability"] = state?.verifyMemberAvailability;
}
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["alternateMode"] = args?.alternateMode;
resourceInputs["disabled"] = args?.disabled;
resourceInputs["dynamicRatio"] = args?.dynamicRatio;
resourceInputs["enabled"] = args?.enabled;
resourceInputs["fallbackIp"] = args?.fallbackIp;
resourceInputs["fallbackMode"] = args?.fallbackMode;
resourceInputs["limitMaxBps"] = args?.limitMaxBps;
resourceInputs["limitMaxBpsStatus"] = args?.limitMaxBpsStatus;
resourceInputs["limitMaxConnections"] = args?.limitMaxConnections;
resourceInputs["limitMaxConnectionsStatus"] = args?.limitMaxConnectionsStatus;
resourceInputs["limitMaxPps"] = args?.limitMaxPps;
resourceInputs["limitMaxPpsStatus"] = args?.limitMaxPpsStatus;
resourceInputs["loadBalancingMode"] = args?.loadBalancingMode;
resourceInputs["manualResume"] = args?.manualResume;
resourceInputs["maxAnswersReturned"] = args?.maxAnswersReturned;
resourceInputs["members"] = args?.members;
resourceInputs["minMembersUpMode"] = args?.minMembersUpMode;
resourceInputs["minMembersUpValue"] = args?.minMembersUpValue;
resourceInputs["monitor"] = args?.monitor;
resourceInputs["name"] = args?.name;
resourceInputs["partition"] = args?.partition;
resourceInputs["qosHitRatio"] = args?.qosHitRatio;
resourceInputs["qosHops"] = args?.qosHops;
resourceInputs["qosKilobytesSecond"] = args?.qosKilobytesSecond;
resourceInputs["qosLcs"] = args?.qosLcs;
resourceInputs["qosPacketRate"] = args?.qosPacketRate;
resourceInputs["qosRtt"] = args?.qosRtt;
resourceInputs["qosTopology"] = args?.qosTopology;
resourceInputs["qosVsCapacity"] = args?.qosVsCapacity;
resourceInputs["qosVsScore"] = args?.qosVsScore;
resourceInputs["ttl"] = args?.ttl;
resourceInputs["type"] = args?.type;
resourceInputs["verifyMemberAvailability"] = args?.verifyMemberAvailability;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(GtmPool.__pulumiType, name, resourceInputs, opts);
}
}
exports.GtmPool = GtmPool;
//# sourceMappingURL=gtmPool.js.map