go-bigip icon indicating copy to clipboard operation
go-bigip copied to clipboard

Attach iRule to Virtual server

Open menta2k opened this issue 7 years ago • 2 comments

Is it possible to attach an iRule to virtual server with your API ?

menta2k avatar Mar 15 '17 13:03 menta2k

@Menta2L Yes!

You would have to add the iRules using the AddVirtualServer method and build the structure yourself. So

// Adds VirtualServer with iRules
config := &bigip.VirtualServer{
	Name:      "someVSname",
	Partition: "Common",
	Rules: []string{
		"/Common/Rule1",
		"/Common/Rule2",
	},
}
f5.AddVirtualServer(config)

I believe that should work. @scottdware

kenmaglio avatar Oct 03 '18 17:10 kenmaglio

You are right, @kenmaglio

scottdware avatar Oct 04 '18 11:10 scottdware