eqixiacEquinix Infrastructure as Code

Dry run

Every dry-run and validate operation the specifications define, how the SDK exposes each, and what a dry run does not prove.

Semantics#

A dry run sends the same request to the same endpoint as a create or an update, with dryRun=true added. The service validates the payload against the account, the inventory and its business rules, and returns the entity it would create or change without provisioning or billing anything.

A dry run that passes shows that the payload was valid at the time it was sent. The service reserves nothing for it, so a VLAN that was free during the dry run can be taken by another request before the create.

Fabric operations#

The Fabric v4 specification documents nine operations with a dryRun query parameter, and the SDK exposes each of them.

OperationSDK callResponse
Create connectionconnections().define(type)...dryRun().create()The validated connection, without UUID or state
Update connectionconnection.update()...dryRun().save()The connection as it would be after the update
Create service tokenserviceTokens().define(side)...dryRun().create()The validated token
Update service tokenserviceTokens().update(uuid)...dryRun().save()The token as it would be after the update
Create portports().define()...dryRun().create()The validated order. The dry run validates a procurement order and does not place it.
Update portports().update(uuid)...dryRun().save()The port. The service wraps this dry-run response in a paginated envelope, unlike the real update. The SDK reads both.
Delete portports().delete(uuid, true)The port that would be deleted
Create Cloud RoutercloudRouters().define()...dryRun().create()The validated router
Create networknetworks().define(type)...dryRun().create()The validated network
Java
import com.eqixiac.equinix.fabric.enums.GatewayPackageCode;
import com.eqixiac.equinix.fabric.enums.NotificationType;
import com.eqixiac.equinix.fabric.model.CloudRouter;
import com.eqixiac.equinix.fabric.model.Connection;

CloudRouter validated = fabric.cloudRouters().define()
    .name("fcr-dc-prod")
    .inMetro("DC")
    .withPackage(GatewayPackageCode.STANDARD)
    .projectId(projectId)
    .notification(NotificationType.ALL, List.of("noc@example.com"))
    .dryRun()
    .create();

Connection existing = fabric.connections().getByUuid(connectionUuid);
Connection afterResize = existing.update().bandwidth(500).dryRun().save();

The SDK has two WireMock tests for each of the nine operations. The first asserts that the request carries dryRun=true on the expected endpoint, and the second asserts that a request without dryRun() omits the parameter. If a code change dropped the parameter, a dry run would become a real create or update, and the first test would fail the build.

Validation operations#

Four further operations validate a request and have no dryRun parameter.

OperationSDK call
POST /fabric/v4/connections/validatefabric.connections().validate(filter), for example to check whether a VLAN is free on a port
Cloud Router routing-protocol validationfabric.cloudRouters().validateRoutingProtocol(routerUuid, filter)
Activation-key validation Betafabric.serviceProfiles().validateActivationKey(profileUuid, environmentUuid, key)
Network Edge backup restore feasibilitySee Network Edge

Internet Access#

EIA v2 update and delete take a dryRun flag. The specification defines no dry run for EIA v2 create.

Java
import com.eqixiac.equinix.internetaccess.model.json.creators.ChangeOperationUpdate;

List<ChangeOperationUpdate> ops = List.of(ChangeOperationUpdate.replace("/bandwidth", "500"));
internet.services().update("service-uuid", ops, true);     // validate only
internet.services().delete("service-uuid", true);          // validate the delete

Dry run in the design layer and the MCP server#

  • DeploymentPlan.dryRun() validates a whole plan and returns a new plan with the validation state. During execute(...) the plan dry-runs each provider connection against its Cloud Router, which exists by then, before it sends the create (Deployment Wizard).
  • The MCP tool fabric_propose_change sends the dry run and issues a confirm token for a payload that passed (Safe Mutation Broker).

Live test tier#

The integration-dryrun Maven profile runs the dry-run and validate operations against a real account without creating anything. Port create, port delete and EIA delete are tested with WireMock only, because a defect that dropped the parameter in a live run would place an order or delete a resource that cannot be restored. Testing describes the tiers.