@Override public ResourceAction perform( ResourceAction oldResourceAction, ResourceAction newResourceAction) throws Exception { AWSEC2SubnetRouteTableAssociationResourceAction oldAction = (AWSEC2SubnetRouteTableAssociationResourceAction) oldResourceAction; AWSEC2SubnetRouteTableAssociationResourceAction newAction = (AWSEC2SubnetRouteTableAssociationResourceAction) newResourceAction; ServiceConfiguration configuration = Topology.lookup(Compute.class); String newAssociationId = newAction.replaceAssociation( configuration, oldAction.info.getPhysicalResourceId(), newAction.properties.getRouteTableId()); newAction.info.setPhysicalResourceId(newAssociationId); newAction.info.setCreatedEnoughToDelete(true); newAction.info.setReferenceValueJson( JsonHelper.getStringFromJsonNode(new TextNode(newAction.info.getPhysicalResourceId()))); return newAction; }