Technical Forum
Ask questions. Discover Answers.
cancel
Showing results for 
Search instead for 
Did you mean: 

I am unable to connect F5 using terraform

Srirengaa
Cirrus
Cirrus

I am trying to connect F5 using terraform and getting below error WhatsApp Image 2022-04-08 at 2.00.40 AM.jpegWhatsApp Image 2022-04-08 at 2.00.39 AM.jpeg

4 REPLIES 4

It might be a caching issue. Try deleting the terraform directory and lock file and then try terraform init command again. Let me know how it goes. 

Cheers,

Rodrigo

Same problem appears.

 

Srirengaa_0-1649396834830.png

 

It says parameter is incorrect in the ending of the error. 

Below file and folder have deleted and gave terraform init then terraform plan command executed but no luck

Srirengaa_1-1649396931536.png

 

Srirengaa
Cirrus
Cirrus

I found it. The script is fine but need to add the resource module what we need to create using terraform. After added below steps in the existing script and it started working, So learning here using terraform to connect F5 will not give any message like " the device is connected" More over i didn't define the SSH or https port to the script that should be also considered one. 

resource "bigip_ltm_node" "node" {
  name             = "/Common/terraform_node1"
  address          = "192.168.30.1"
  connection_limit = "0"
  dynamic_ratio    = "1"
  monitor          = "/Common/icmp"
  description      = "Test-Node"
  rate_limit       = "disabled"
  fqdn {
    address_family = "ipv4"
    interval       = "3000"
  }
}

Srirengaa_0-1649435494942.png

This is a whole script 

 

variable hostname {}
variable username {}
variable password {}
terraform {
  required_providers {
    bigip = {
      source = "f5networks/bigip"
      version = "1.13.0"
    }
  }
  }
provider "bigip" {
  address  = var.hostname
  username = var.username
  password = var.password
}
resource "bigip_ltm_node" "node" {
  name             = "/Common/terraform_node1"
  address          = "192.168.30.1"
  connection_limit = "0"
  dynamic_ratio    = "1"
  monitor          = "/Common/icmp"
  description      = "Test-Node"
  rate_limit       = "disabled"
  fqdn {
    address_family = "ipv4"
    interval       = "3000"
  }
}
 Verified in F5 and it is created a node using terraform.
Srirengaa_1-1649435693538.png

 

 

@

Rodrigo_Albuque - Thanks to you man for quick turn around.