-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2b384d9
commit bb9c168
Showing
12 changed files
with
4,469 additions
and
0 deletions.
There are no files selected for viewing
508 changes: 508 additions & 0 deletions
508
...blic_load_balancer_vm_ip_attributes_ok/step1.public_load_balancer_vm_ip_attributes_ok.ref
Large diffs are not rendered by default.
Oops, something went wrong.
57 changes: 57 additions & 0 deletions
57
...ublic_load_balancer_vm_ip_attributes_ok/step1.public_load_balancer_vm_ip_attributes_ok.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
resource "outscale_keypair" "my_keypair" { | ||
keypair_name = "KP-TF011" | ||
} | ||
|
||
resource "outscale_security_group" "security_groupTF011" { | ||
description = "Terraform" | ||
security_group_name = "terraform-TF011" | ||
} | ||
|
||
|
||
resource "outscale_vm" "vm011" { | ||
count = 3 | ||
security_group_ids = [outscale_security_group.security_groupTF011.security_group_id] | ||
image_id = var.image_id | ||
vm_type = var.vm_type | ||
keypair_name = outscale_keypair.my_keypair.keypair_name | ||
tags { | ||
key = "name" | ||
value = "vm-TF011" | ||
} | ||
} | ||
|
||
|
||
resource "outscale_load_balancer" "public_lbu11" { | ||
load_balancer_name = "lbu-TF-011-${var.suffixe_lbu_name}" | ||
subregion_names = ["${var.region}a"] | ||
listeners { | ||
backend_port = 80 | ||
backend_protocol = "TCP" | ||
load_balancer_protocol = "TCP" | ||
load_balancer_port = 80 | ||
} | ||
listeners { | ||
backend_port = 8080 | ||
backend_protocol = "HTTP" | ||
load_balancer_protocol = "HTTP" | ||
load_balancer_port = 8080 | ||
} | ||
tags { | ||
key = "name" | ||
value = "public_lbu1" | ||
} | ||
} | ||
|
||
|
||
resource "outscale_load_balancer_vms" "outscale_load_balancer_vms011" { | ||
load_balancer_name = outscale_load_balancer.public_lbu11.load_balancer_name | ||
backend_ips = [outscale_vm.vm011[0].public_ip,outscale_vm.vm011[1].public_ip] | ||
} | ||
|
||
data "outscale_load_balancer" "load_balancer_TF011" { | ||
filter { | ||
name = "load_balancer_names" | ||
values = [outscale_load_balancer.public_lbu11.load_balancer_name] | ||
} | ||
depends_on =[outscale_load_balancer_vms.outscale_load_balancer_vms011] | ||
} |
Oops, something went wrong.