Skip to content

Instantly share code, notes, and snippets.

@ryancbutler
Created July 6, 2022 13:56
Show Gist options
  • Save ryancbutler/6d0f8e0e0b4feba8b465c2b91667e2ab to your computer and use it in GitHub Desktop.
Save ryancbutler/6d0f8e0e0b4feba8b465c2b91667e2ab to your computer and use it in GitHub Desktop.
Citrix ADC license example
terraform {
required_version = ">= 1.0.0"
required_providers {
citrixadc = {
source = "citrix/citrixadc"
version = "1.17.0"
}
}
}
provider "citrixadc" {
endpoint = "http://192.168.2.66"
username = "nsroot"
password = "newnsroot"
}
resource "citrixadc_nsip" "snip" {
ipaddress = "192.168.2.67"
type = "SNIP"
netmask = "255.255.255.0"
icmp = "ENABLED"
}
resource "citrixadc_password_resetter" "tf_resetter" {
username = "nsroot"
password = "nsroot"
new_password = "newnsroot"
}
resource "citrixadc_nsconfig_save" "tf_ns_save" {
all = true
timestamp = timestamp()
depends_on = [
citrixadc_password_resetter.tf_resetter
]
}
resource "citrixadc_systemfile" "license" {
filename = "FID_mylic.lic"
filelocation = "/nsconfig/license"
filecontent = file("${path.module}/FID_mylic.lic")
}
resource "citrixadc_rebooter" "tf_rebooter" {
timestamp = timestamp()
warm = true
wait_until_reachable = true
depends_on = [
citrixadc_nsconfig_save.tf_ns_save,
citrixadc_systemfile.license,
citrixadc_nsip.snip
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment