UNPKG

@pulumi/f5bigip

Version:

A Pulumi package for creating and managing F5 BigIP resources.

994 lines 27.1 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * `f5bigip.As3` provides details about bigip as3 resource * * This resource is helpful to configure AS3 declarative JSON on BIG-IP. * * > This Resource also supports **Per-Application** mode of AS3 deployment, more information on **Per-Application** mode can be found [Per-App](https://clouddocs.f5.com/products/extensions/f5-appsvcs-extension/latest/userguide/per-app-declarations.html) * * > For Supporting AS3 Per-App mode of deployment, AS3 version on BIG-IP should be > **v3.50** * * > For Deploying AS3 JSON in Per-App mode, this resource provided with a attribute tenantName to be passed to add application on specified tenant, else random tenant name will be generated. * * As3 Declaration can be deployed in Traditional way as well as Per-Application Way : * * - Traditional Way - Entire Declaration needs to be passed in during the create and update call along with the tenant details in the declaration. * - Per-Application Way - Only application details needs to be passed in the as3_json. Tenant name needs to be passed else random tenant name will be generated. * * **Note:** : PerApplication needs to be turned `true` as a Prerequisite on the Big-IP (BIG-IP AS3 version >3.50) device. For details : <https://clouddocs.f5.com/products/extensions/f5-appsvcs-extension/latest/userguide/per-app-declarations.html> * * ### Delete Specific Applications from a Tenant * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as f5bigip from "@pulumi/f5bigip"; * * const as3AppDeletion = new f5bigip.As3("as3_app_deletion", {deleteApps: { * tenantName: "Tenant-2", * apps: [ * "terraform_vs_http", * "legacy_app", * ], * }}); * ``` * * ## Example of controls parameters * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as f5bigip from "@pulumi/f5bigip"; * import * as std from "@pulumi/std"; * * const as3_example1 = new f5bigip.As3("as3-example1", { * as3Json: std.file({ * input: "example1.json", * }).then(invoke => invoke.result), * controls: { * dry_run: "no", * trace: "yes", * trace_response: "yes", * log_level: "debug", * user_agent: "dummy agent", * }, * }); * ``` * * # Per-Application Deployment - Example Usage for json file with tenant name * resource "f5bigip.As3" "as3-example1" { * as3Json = file("perApplication_example.json") * tenantName = "Test" * } * * # Per-Application Deployment - Example Usage for json file without tenant name - Tenant with Random name is generated in this case * resource "f5bigip.As3" "as3-example1" { * as3Json = file("perApplication_example.json") * } * * ## Behavior * * When `deleteApps` is used, Terraform logs “Creating...”, but the underlying logic performs application deletion via REST API calls. * * Each app in the `apps` list is deleted using: * * A synthetic resource ID is assigned to keep Terraform state consistent after successful deletion. * * *** * * ## Outputs * * - `taskId` – AS3 task ID used in BIG-IP. * - `applicationList` – List of deleted applications (if applicable). * - `tenantList` – List of affected tenants. * * *** * * ## Import * * As3 resources can be imported using the partition name, e.g., ( use comma separated partition names if there are multiple partitions in as3 deployments ) * * ```sh * $ pulumi import f5bigip:index/as3:As3 test Sample_http_01 * $ pulumi import f5bigip:index/as3:As3 test Sample_http_01,Sample_non_http_01 * ``` * * #### Import examples ( single and multiple partitions ) * * ```sh * * $ pulumi import f5bigip:index/as3:As3 test Sample_http_01 * bigip_as3.test: Importing from ID "Sample_http_01"... * bigip_as3.test: Import prepared! * Prepared bigip_as3 for import * bigip_as3.test: Refreshing state... [id=Sample_http_01] * * Import successful! * * The resources that were imported are shown above. These resources are now in * your Terraform state and will henceforth be managed by Terraform. * * $ terraform show * ``` * * bigip_as3.test: * resource "f5bigip.As3" "test" { * as3Json = jsonencode( * { * action = "deploy" * class = "AS3" * declaration = { * Sample_http_01 = { * A1 = { * class = "Application" * jsessionid = { * class = "Persist" * cookieMethod = "hash" * cookieName = "JSESSIONID" * persistenceMethod = "cookie" * } * service = { * class = "Service_HTTP" * persistenceMethods = [ * { * use = "jsessionid" * }, * ] * pool = "webPool" * virtualAddresses = [ * "10.0.2.10", * ] * } * webPool = { * class = "Pool" * members = [ * { * serverAddresses = [ * "192.0.2.10", * "192.0.2.11", * ] * servicePort = 80 * }, * ] * monitors = [ * "http", * ] * } * } * class = "Tenant" * } * class = "ADC" * id = "UDP_DNS_Sample" * label = "UDP_DNS_Sample" * remark = "Sample of a UDP DNS Load Balancer Service" * schemaVersion = "3.0.0" * } * persist = true * } * ) * id = "Sample_http_01" * tenantFilter = "Sample_http_01" * tenantList = "Sample_http_01" * } * * ```sh * $ pulumi import f5bigip:index/as3:As3 test Sample_http_01,Sample_non_http_01 * bigip_as3.test: Importing from ID "Sample_http_01,Sample_non_http_01"... * bigip_as3.test: Import prepared! * Prepared bigip_as3 for import * bigip_as3.test: Refreshing state... [id=Sample_http_01,Sample_non_http_01] * * Import successful! * * The resources that were imported are shown above. These resources are now in * your Terraform state and will henceforth be managed by Terraform. * * $ terraform show * ``` * * bigip_as3.test: * resource "f5bigip.As3" "test" { * as3Json = jsonencode( * { * action = "deploy" * class = "AS3" * declaration = { * Sample_http_01 = { * A1 = { * class = "Application" * jsessionid = { * class = "Persist" * cookieMethod = "hash" * cookieName = "JSESSIONID" * persistenceMethod = "cookie" * } * service = { * class = "Service_HTTP" * persistenceMethods = [ * { * use = "jsessionid" * }, * ] * pool = "webPool" * virtualAddresses = [ * "10.0.2.10", * ] * } * webPool = { * class = "Pool" * members = [ * { * serverAddresses = [ * "192.0.2.10", * "192.0.2.11", * ] * servicePort = 80 * }, * ] * monitors = [ * "http", * ] * } * } * class = "Tenant" * } * Sample_non_http_01 = { * DNS_Service = { * Pool1 = { * class = "Pool" * members = [ * { * serverAddresses = [ * "10.1.10.100", * ] * servicePort = 53 * }, * { * serverAddresses = [ * "10.1.10.101", * ] * servicePort = 53 * }, * ] * monitors = [ * "icmp", * ] * } * class = "Application" * service = { * class = "Service_UDP" * pool = "Pool1" * virtualAddresses = [ * "10.1.20.121", * ] * virtualPort = 53 * } * } * class = "Tenant" * } * class = "ADC" * id = "UDP_DNS_Sample" * label = "UDP_DNS_Sample" * remark = "Sample of a UDP DNS Load Balancer Service" * schemaVersion = "3.0.0" * } * persist = true * } * ) * id = "Sample_http_01,Sample_non_http_01" * tenantFilter = "Sample_http_01,Sample_non_http_01" * tenantList = "Sample_http_01,Sample_non_http_01" * } * * * `AS3 documentation` - https://clouddocs.f5.com/products/extensions/f5-appsvcs-extension/latest/userguide/composing-a-declaration.html */ export declare class As3 extends pulumi.CustomResource { /** * Get an existing As3 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: string, id: pulumi.Input<pulumi.ID>, state?: As3State, opts?: pulumi.CustomResourceOptions): As3; /** * Returns true if the given object is an instance of As3. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is As3; /** * List of applications currently deployed on the Big-Ip */ readonly applicationList: pulumi.Output<string>; /** * Path/Filename of Declarative AS3 JSON which is a json file used with builtin ```file``` function */ readonly as3Json: pulumi.Output<string | undefined>; /** * A map that allows you to configure specific behavior controls for the AS3 declaration. Each key represents a particular control setting, and the corresponding value defines its configuration. */ readonly controls: pulumi.Output<{ [key: string]: string; } | undefined>; /** * Block for specifying tenant name and applications to delete from BIG-IP. **Mutually exclusive with `as3Json`**: only one of `deleteApps` or `as3Json` can be set in a resource block. */ readonly deleteApps: pulumi.Output<outputs.As3DeleteApps | undefined>; /** * Set True if you want to ignore metadata changes during update. By default it is set to false * * * `as3_example1.json` - Example AS3 Declarative JSON file with single tenant * * ```json * * { * "class": "AS3", * "action": "deploy", * "persist": true, * "declaration": { * "class": "ADC", * "schemaVersion": "3.0.0", * "id": "example-declaration-01", * "label": "Sample 1", * "remark": "Simple HTTP application with round robin pool", * "Sample_01": { * "class": "Tenant", * "defaultRouteDomain": 0, * "Application_1": { * "class": "Application", * "template": "http", * "serviceMain": { * "class": "Service_HTTP", * "virtualAddresses": [ * "10.0.2.10" * ], * "pool": "web_pool" * }, * "web_pool": { * "class": "Pool", * "monitors": [ * "http" * ], * "members": [ * { * "servicePort": 80, * "serverAddresses": [ * "192.0.1.100", * "192.0.1.110" * ] * } * ] * } * } * } * } * } * * ``` * * `as3_example2.json` - Example AS3 Declarative JSON file with multiple tenants * * ```json * * { * "class": "AS3", * "action": "deploy", * "persist": true, * "declaration": { * "class": "ADC", * "schemaVersion": "3.0.0", * "id": "example-declaration-01", * "label": "Sample 1", * "remark": "Simple HTTP application with round robin pool", * "Sample_02": { * "class": "Tenant", * "defaultRouteDomain": 0, * "Application_2": { * "class": "Application", * "template": "http", * "serviceMain": { * "class": "Service_HTTP", * "virtualAddresses": [ * "10.2.2.10" * ], * "pool": "web_pool2" * }, * "web_pool2": { * "class": "Pool", * "monitors": [ * "http" * ], * "members": [ * { * "servicePort": 80, * "serverAddresses": [ * "192.2.1.100", * "192.2.1.110" * ] * } * ] * } * } * }, * "Sample_03": { * "class": "Tenant", * "defaultRouteDomain": 0, * "Application_3": { * "class": "Application", * "template": "http", * "serviceMain": { * "class": "Service_HTTP", * "virtualAddresses": [ * "10.1.2.10" * ], * "pool": "web_pool3" * }, * "web_pool3": { * "class": "Pool", * "monitors": [ * "http" * ], * "members": [ * { * "servicePort": 80, * "serverAddresses": [ * "192.3.1.100", * "192.3.1.110" * ] * } * ] * } * } * } * } * } * * ``` * * * `perApplication_example` - Per Application Example - JSON file with multiple Applications (and no Tenant Details) * * ```json * { * "Application1": { * "class": "Application", * "service": { * "class": "Service_HTTP", * "virtualAddresses": [ * "192.0.2.1" * ], * "pool": "pool" * }, * "pool": { * "class": "Pool", * "members": [ * { * "servicePort": 80, * "serverAddresses": [ * "192.0.2.10", * "192.0.2.20" * ] * } * ] * } * }, * "Application2": { * "class": "Application", * "service": { * "class": "Service_HTTP", * "virtualAddresses": [ * "192.0.3.2" * ], * "pool": "pool" * }, * "pool": { * "class": "Pool", * "members": [ * { * "servicePort": 80, * "serverAddresses": [ * "192.0.3.30", * "192.0.3.40" * ] * } * ] * } * } * } * ``` * * # f5bigip.As3 delete one or more applications * * The `f5bigip.As3` resource allows you to **post full AS3 declarations** or **selectively delete one or more applications** from a specific tenant in BIG-IP. * * > **Note**: `deleteApps` and `as3Json` are **mutually exclusive**. You must use only one of them in a single `f5bigip.As3` resource block. */ readonly ignoreMetadata: pulumi.Output<boolean | undefined>; /** * Will specify whether is deployment is done via Per-Application Way or Traditional Way */ readonly perAppMode: pulumi.Output<boolean>; /** * ID of AS3 post declaration async task */ readonly taskId: pulumi.Output<string>; /** * If there are multiple tenants on a BIG-IP, this attribute helps the user to set a particular tenant to which he want to reflect the changes. Other tenants will neither be created nor be modified. */ readonly tenantFilter: pulumi.Output<string>; /** * List of tenants currently deployed on the Big-Ip */ readonly tenantList: pulumi.Output<string>; /** * Name of Tenant. This name is used only in the case of Per-Application Deployment. If it is not provided, then a random name would be generated. */ readonly tenantName: pulumi.Output<string>; /** * Create a As3 resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args?: As3Args, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering As3 resources. */ export interface As3State { /** * List of applications currently deployed on the Big-Ip */ applicationList?: pulumi.Input<string | undefined>; /** * Path/Filename of Declarative AS3 JSON which is a json file used with builtin ```file``` function */ as3Json?: pulumi.Input<string | undefined>; /** * A map that allows you to configure specific behavior controls for the AS3 declaration. Each key represents a particular control setting, and the corresponding value defines its configuration. */ controls?: pulumi.Input<{ [key: string]: pulumi.Input<string>; } | undefined>; /** * Block for specifying tenant name and applications to delete from BIG-IP. **Mutually exclusive with `as3Json`**: only one of `deleteApps` or `as3Json` can be set in a resource block. */ deleteApps?: pulumi.Input<inputs.As3DeleteApps | undefined>; /** * Set True if you want to ignore metadata changes during update. By default it is set to false * * * `as3_example1.json` - Example AS3 Declarative JSON file with single tenant * * ```json * * { * "class": "AS3", * "action": "deploy", * "persist": true, * "declaration": { * "class": "ADC", * "schemaVersion": "3.0.0", * "id": "example-declaration-01", * "label": "Sample 1", * "remark": "Simple HTTP application with round robin pool", * "Sample_01": { * "class": "Tenant", * "defaultRouteDomain": 0, * "Application_1": { * "class": "Application", * "template": "http", * "serviceMain": { * "class": "Service_HTTP", * "virtualAddresses": [ * "10.0.2.10" * ], * "pool": "web_pool" * }, * "web_pool": { * "class": "Pool", * "monitors": [ * "http" * ], * "members": [ * { * "servicePort": 80, * "serverAddresses": [ * "192.0.1.100", * "192.0.1.110" * ] * } * ] * } * } * } * } * } * * ``` * * `as3_example2.json` - Example AS3 Declarative JSON file with multiple tenants * * ```json * * { * "class": "AS3", * "action": "deploy", * "persist": true, * "declaration": { * "class": "ADC", * "schemaVersion": "3.0.0", * "id": "example-declaration-01", * "label": "Sample 1", * "remark": "Simple HTTP application with round robin pool", * "Sample_02": { * "class": "Tenant", * "defaultRouteDomain": 0, * "Application_2": { * "class": "Application", * "template": "http", * "serviceMain": { * "class": "Service_HTTP", * "virtualAddresses": [ * "10.2.2.10" * ], * "pool": "web_pool2" * }, * "web_pool2": { * "class": "Pool", * "monitors": [ * "http" * ], * "members": [ * { * "servicePort": 80, * "serverAddresses": [ * "192.2.1.100", * "192.2.1.110" * ] * } * ] * } * } * }, * "Sample_03": { * "class": "Tenant", * "defaultRouteDomain": 0, * "Application_3": { * "class": "Application", * "template": "http", * "serviceMain": { * "class": "Service_HTTP", * "virtualAddresses": [ * "10.1.2.10" * ], * "pool": "web_pool3" * }, * "web_pool3": { * "class": "Pool", * "monitors": [ * "http" * ], * "members": [ * { * "servicePort": 80, * "serverAddresses": [ * "192.3.1.100", * "192.3.1.110" * ] * } * ] * } * } * } * } * } * * ``` * * * `perApplication_example` - Per Application Example - JSON file with multiple Applications (and no Tenant Details) * * ```json * { * "Application1": { * "class": "Application", * "service": { * "class": "Service_HTTP", * "virtualAddresses": [ * "192.0.2.1" * ], * "pool": "pool" * }, * "pool": { * "class": "Pool", * "members": [ * { * "servicePort": 80, * "serverAddresses": [ * "192.0.2.10", * "192.0.2.20" * ] * } * ] * } * }, * "Application2": { * "class": "Application", * "service": { * "class": "Service_HTTP", * "virtualAddresses": [ * "192.0.3.2" * ], * "pool": "pool" * }, * "pool": { * "class": "Pool", * "members": [ * { * "servicePort": 80, * "serverAddresses": [ * "192.0.3.30", * "192.0.3.40" * ] * } * ] * } * } * } * ``` * * # f5bigip.As3 delete one or more applications * * The `f5bigip.As3` resource allows you to **post full AS3 declarations** or **selectively delete one or more applications** from a specific tenant in BIG-IP. * * > **Note**: `deleteApps` and `as3Json` are **mutually exclusive**. You must use only one of them in a single `f5bigip.As3` resource block. */ ignoreMetadata?: pulumi.Input<boolean | undefined>; /** * Will specify whether is deployment is done via Per-Application Way or Traditional Way */ perAppMode?: pulumi.Input<boolean | undefined>; /** * ID of AS3 post declaration async task */ taskId?: pulumi.Input<string | undefined>; /** * If there are multiple tenants on a BIG-IP, this attribute helps the user to set a particular tenant to which he want to reflect the changes. Other tenants will neither be created nor be modified. */ tenantFilter?: pulumi.Input<string | undefined>; /** * List of tenants currently deployed on the Big-Ip */ tenantList?: pulumi.Input<string | undefined>; /** * Name of Tenant. This name is used only in the case of Per-Application Deployment. If it is not provided, then a random name would be generated. */ tenantName?: pulumi.Input<string | undefined>; } /** * The set of arguments for constructing a As3 resource. */ export interface As3Args { /** * List of applications currently deployed on the Big-Ip */ applicationList?: pulumi.Input<string | undefined>; /** * Path/Filename of Declarative AS3 JSON which is a json file used with builtin ```file``` function */ as3Json?: pulumi.Input<string | undefined>; /** * A map that allows you to configure specific behavior controls for the AS3 declaration. Each key represents a particular control setting, and the corresponding value defines its configuration. */ controls?: pulumi.Input<{ [key: string]: pulumi.Input<string>; } | undefined>; /** * Block for specifying tenant name and applications to delete from BIG-IP. **Mutually exclusive with `as3Json`**: only one of `deleteApps` or `as3Json` can be set in a resource block. */ deleteApps?: pulumi.Input<inputs.As3DeleteApps | undefined>; /** * Set True if you want to ignore metadata changes during update. By default it is set to false * * * `as3_example1.json` - Example AS3 Declarative JSON file with single tenant * * ```json * * { * "class": "AS3", * "action": "deploy", * "persist": true, * "declaration": { * "class": "ADC", * "schemaVersion": "3.0.0", * "id": "example-declaration-01", * "label": "Sample 1", * "remark": "Simple HTTP application with round robin pool", * "Sample_01": { * "class": "Tenant", * "defaultRouteDomain": 0, * "Application_1": { * "class": "Application", * "template": "http", * "serviceMain": { * "class": "Service_HTTP", * "virtualAddresses": [ * "10.0.2.10" * ], * "pool": "web_pool" * }, * "web_pool": { * "class": "Pool", * "monitors": [ * "http" * ], * "members": [ * { * "servicePort": 80, * "serverAddresses": [ * "192.0.1.100", * "192.0.1.110" * ] * } * ] * } * } * } * } * } * * ``` * * `as3_example2.json` - Example AS3 Declarative JSON file with multiple tenants * * ```json * * { * "class": "AS3", * "action": "deploy", * "persist": true, * "declaration": { * "class": "ADC", * "schemaVersion": "3.0.0", * "id": "example-declaration-01", * "label": "Sample 1", * "remark": "Simple HTTP application with round robin pool", * "Sample_02": { * "class": "Tenant", * "defaultRouteDomain": 0, * "Application_2": { * "class": "Application", * "template": "http", * "serviceMain": { * "class": "Service_HTTP", * "virtualAddresses": [ * "10.2.2.10" * ], * "pool": "web_pool2" * }, * "web_pool2": { * "class": "Pool", * "monitors": [ * "http" * ], * "members": [ * { * "servicePort": 80, * "serverAddresses": [ * "192.2.1.100", * "192.2.1.110" * ] * } * ] * } * } * }, * "Sample_03": { * "class": "Tenant", * "defaultRouteDomain": 0, * "Application_3": { * "class": "Application", * "template": "http", * "serviceMain": { * "class": "Service_HTTP", * "virtualAddresses": [ * "10.1.2.10" * ], * "pool": "web_pool3" * }, * "web_pool3": { * "class": "Pool", * "monitors": [ * "http" * ], * "members": [ * { * "servicePort": 80, * "serverAddresses": [ * "192.3.1.100", * "192.3.1.110" * ] * } * ] * } * } * } * } * } * * ``` * * * `perApplication_example` - Per Application Example - JSON file with multiple Applications (and no Tenant Details) * * ```json * { * "Application1": { * "class": "Application", * "service": { * "class": "Service_HTTP", * "virtualAddresses": [ * "192.0.2.1" * ], * "pool": "pool" * }, * "pool": { * "class": "Pool", * "members": [ * { * "servicePort": 80, * "serverAddresses": [ * "192.0.2.10", * "192.0.2.20" * ] * } * ] * } * }, * "Application2": { * "class": "Application", * "service": { * "class": "Service_HTTP", * "virtualAddresses": [ * "192.0.3.2" * ], * "pool": "pool" * }, * "pool": { * "class": "Pool", * "members": [ * { * "servicePort": 80, * "serverAddresses": [ * "192.0.3.30", * "192.0.3.40" * ] * } * ] * } * } * } * ``` * * # f5bigip.As3 delete one or more applications * * The `f5bigip.As3` resource allows you to **post full AS3 declarations** or **selectively delete one or more applications** from a specific tenant in BIG-IP. * * > **Note**: `deleteApps` and `as3Json` are **mutually exclusive**. You must use only one of them in a single `f5bigip.As3` resource block. */ ignoreMetadata?: pulumi.Input<boolean | undefined>; /** * ID of AS3 post declaration async task */ taskId?: pulumi.Input<string | undefined>; /** * If there are multiple tenants on a BIG-IP, this attribute helps the user to set a particular tenant to which he want to reflect the changes. Other tenants will neither be created nor be modified. */ tenantFilter?: pulumi.Input<string | undefined>; /** * List of tenants currently deployed on the Big-Ip */ tenantList?: pulumi.Input<string | undefined>; /** * Name of Tenant. This name is used only in the case of Per-Application Deployment. If it is not provided, then a random name would be generated. */ tenantName?: pulumi.Input<string | undefined>; } //# sourceMappingURL=as3.d.ts.map