netascode / terraform-provider-fmc

Mozilla Public License 2.0
1 stars 3 forks source link

add Device resource for Cisco FTD #32

Closed jabielecki closed 3 weeks ago

jabielecki commented 1 month ago

Testing

The standard lab setup is a pair: FMC + FTD, each having its own IP address. (I can lend my lab on request.)

Creating resource fmc_device can only succeed when lab FTD is pre-configured. That can only be done through ssh admin@FTD, so I'm adding SSH support to the tests. Destroying resource fmc_device always erases the pre-configuration, so it cannot be done as a one-off lab action.

  1. ssh admin@FTD at least once, as it enforces an initial password change.
  2. Export variables: FMC_USERNAME=admin FMC_PASSWORD=x FMC_URL=https://10.50.y.y FTD_ADDR=10.50.z.z FTD_USERNAME=admin FTD_PASSWORD=x
  3. Run TF_ACC, adding -timeout 20m option or more. Every apply/destroy of FTD alone takes about 5 minutes and is done twice, the entire test takes about 12 minutes.

No other device was tested besides FTDv.

Reason for minimum test

minimum_test_value: '"device1alt"'

This is a trick. The goal is to include in testing a (quite usual) state of the device where it is DEPLOYMENT_PENDING and not DEPLOYED. Changing the device name between minimal test and full test is one of the ways to achieve that.