Skip to content

Commit

Permalink
fixes for sleep issue and other issue
Browse files Browse the repository at this point in the history
  • Loading branch information
RavinderReddyF5 committed Dec 8, 2021
1 parent b575bca commit 6e57277
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 10 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,8 @@ These variables have default values and don't have to be set to use this module.
| f5\_username | The admin username of the F5 BIG-IP that will be deployed | `string` | bigipuser |
| f5\_password | Password of the F5 BIG-IP that will be deployed.If this is not specified random password will get generated | `string` | "" |
| image | The self-link URI for a BIG-IP image to use as a base for the VM cluster | `string` | "projects/f5-7626-networks-public/global/images/f5-bigip-16-0-1-1-0-0-6-payg-good-25mbps-210129040032" |
| min_cpu_platform | Minimum CPU platform for the VM instance such as Intel Haswell or Intel Skylake | string`| Intel Skylake |
| machine_type | The machine type to create,if you want to update this value (resize the VM) after initial creation, you must set allow_stopping_for_update to true | string` | n1-standard-4 |
| min_cpu_platform | Minimum CPU platform for the VM instance such as Intel Haswell or Intel Skylake | `string`| Intel Skylake |
| machine_type | The machine type to create,if you want to update this value (resize the VM) after initial creation, you must set allow_stopping_for_update to true | `string` | n1-standard-4 |
| automatic_restart | Specifies if the instance should be restarted if it was terminated by Compute Engine (not a user) | `bool` | true |
| preemptible | Specifies if the instance is preemptible. If this field is set to true, then automatic_restart must be set to false | `boo1` | false |
| disk_type | The GCE disk type. May be set to pd-standard, pd-balanced or pd-ssd | `string` | pd-ssd |
Expand All @@ -252,7 +252,8 @@ These variables have default values and don't have to be set to use this module.
| FAST_URL | URL to download the BIG-IP FAST module | `string` | latest |
| CFE_URL | URL to download the BIG-IP Cloud Failover Extension module | `string` | latest |
| INIT_URL | URL to download the BIG-IP runtime init module | `string` | latest |
| custom\_user\_data | Provide a custom bash script or cloud-init script the BIG-IP will run on creation | string | null |
| custom\_user\_data | Provide a custom bash script or cloud-init script the BIG-IP will run on creation | `string` | null |
| sleep_time | The number of seconds/minutes of delay to build into creation of BIG-IP VMs | `string` | 300s |
#### Output Variables
Expand Down
2 changes: 1 addition & 1 deletion examples/bigip_gcp_1nic_deploy/variables.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
variable "instance_count" {
description = "Number of Bigip instances to create( From terraform 0.13, module supports count feature to spin mutliple instances )"
type = number
default = 2
default = 1
}
variable "prefix" {
description = "Prefix for resources created by this module"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ extension_services:
service_operations:
- extensionType: do
type: url
value: https://raw.githubusercontent.com/f5devcentral/terraform-gcp-bigip-module/main/config/onboard_do.json
value: https://raw.githubusercontent.com/F5Networks/terraform-gcp-bigip-module/main/config/onboard_do.json
EOF
fi

Expand Down
9 changes: 5 additions & 4 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,10 @@ resource "google_compute_instance" "f5vm01" {
sshKeys = file(var.f5_ssh_publickey)
} : {}
)

provisioner "local-exec" {
command = "sleep 250"
}
labels = var.labels
}

resource "time_sleep" "wait_for_google_compute_instance_f5vm" {
depends_on = [google_compute_instance.f5vm01]
create_duration = var.sleep_time
}
2 changes: 1 addition & 1 deletion startup-script.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ extension_services:
service_operations:
- extensionType: do
type: url
value: https://raw.githubusercontent.com/f5devcentral/terraform-gcp-bigip-module/main/config/onboard_do.json
value: https://raw.githubusercontent.com/F5Networks/terraform-gcp-bigip-module/main/config/onboard_do.json
EOF
fi

Expand Down
5 changes: 5 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -198,3 +198,8 @@ variable "metadata" {
default = {}
}

variable "sleep_time" {
type = string
default = "300s"
description = "The number of seconds/minutes of delay to build into creation of BIG-IP VMs; default is 250. BIG-IP requires a few minutes to complete the onboarding process and this value can be used to delay the processing of dependent Terraform resources."
}

0 comments on commit 6e57277

Please sign in to comment.