Comments (6)
/* nodes with port1 */
resource "bigip_ltm_node" "nodes_port1" {
count = "${var.nodes_port1_count}"
name = "${format("/%s/%s", var.partition_name, element(keys(var.nodes_port1), count.index))}"
address = "${lookup(var.nodes_port1, element(keys(var.nodes_port1), count.index))}"
monitor = "default"
rate_limit = "disabled"
dynamic_ratio = "1"
}
/* nodes with port2 */
resource "bigip_ltm_node" "nodes_port2" {
count = "${var.nodes_port2_count}"
name = "${format("/%s/%s", var.partition_name, element(keys(var.nodes_port2), count.index))}"
address = "${lookup(var.nodes_port2, element(keys(var.nodes_port2), count.index))}"
monitor = "default"
rate_limit = "disabled"
dynamic_ratio = "1"
}
/* pool */
resource "bigip_ltm_pool" "pool" {
name = "${format("/%s/pool", var.partition_name)}"
load_balancing_mode = "round-robin"
monitors = ["/Common/tcp"]
allow_snat = "yes"
allow_nat = "yes"
depends_on = ["bigip_ltm_node.nodes_port1", "bigip_ltm_node.nodes_port2"]
}
/* Pool attachment nodes port1*/
resource "bigip_ltm_pool_attachment" "nodes_port1" {
count = "${var.nodes_port1_count}"
pool = "${bigip_ltm_pool.pool.name}"
node = "${format("%s:443", bigip_ltm_node.nodes_port1.*.name[count.index])}"
depends_on = ["bigip_ltm_node.nodes_port1", "bigip_ltm_pool.pool"]
}
/* Pool attachment nodes port2*/
resource "bigip_ltm_pool_attachment" "nodes_port2" {
count = "${var.nodes_port2_count}"
pool = "${bigip_ltm_pool.pool.name}"
node = "${format("%s:80", bigip_ltm_node.nodes_port2.*.name[count.index])}"
depends_on = ["bigip_ltm_node.nodes_port2", "bigip_ltm_pool.pool"]
}
from terraform-provider-bigip.
Thanks, i'll try this.
from terraform-provider-bigip.
@scshitole Would you be able to provide a version targeted for 0.12? It seems that the new for loop functionality would really come in handy here.
from terraform-provider-bigip.
release v0.12.3 is out (https://github.com/terraform-providers/terraform-provider-bigip/blob/v0.12.3/CHANGELOG.md#0123-june-06-2019) and includes support for 0.12
from terraform-provider-bigip.
Yes, I am aware. We are building an Big-IP configuration from scratch so it would be very helpful to take advantage of some of 0.12's new features like dynamic blocks and for loops. But I haven't yet seen any working examples of such with this provider.
How can we for example generate dynamic blocks of node resources from a list of node names?
from terraform-provider-bigip.
Nevermind - I now see that for/for_each does not (yet) apply at the resource level, so I went with the old count method.
from terraform-provider-bigip.
Related Issues (20)
- Documentation is not updated and a default value for token_auth was changed in version 1.16.1 of the provider HOT 2
- Add support for telemetry streaming declarative endpoint HOT 1
- Add persistence_profiles argument for FAST TCP/HTTP(S) applications HOT 1
- bigip_ltm_irule missing \r\n when plan/apply. change everytime HOT 5
- Missing Terraform resorce to "Create profile for request logging" HOT 2
- "...mgmt/shared/authn/login": EOF when connecting to bigip with 1.19.0 and 1.20.0 HOT 1
- Error importing JSON with bigip_waf_policy: cannot unmarshal number into Go struct field HOT 6
- Issue with clientssl profile when using parent/child (defauls-from) HOT 1
- Possibility to configure the MTU size on a vlan HOT 3
- Cannot update SSL key/cert used by SSL profile attached to Virtual Server HOT 10
- Virtual Server 0.0.0.0 Mask Conversion HOT 2
- Deleting iRules from Virtual Server Configs HOT 9
- RFE: Add new resource to create/manage Rewrite profiles HOT 3
- Support for check_max_value_length in parameters for declarative WAF policy HOT 1
- Issue with virtual address deletion or replacement when the name field contains the route domain (f.e. %50) HOT 1
- bigip_ltm_node resource fails consistently with: "Error: error modifying node /Common/<node_name_here>: "node" unexpected argument" HOT 1
- Requesting the ability to use a port list in terraform for f5networks/bigip provider HOT 3
- bigip_ltm_profile_http encrypt_cookie_secret plan diffs HOT 1
- Terraform error while deploying to LTM VE HOT 1
- Fake changes on security log profile in bigip_ltm_virtual_server resource HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terraform-provider-bigip.